function merci_load_content_type_settings in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6
Loads the settings for a single MERCI content type.
Parameters
$content_type: The type to load.
Return value
An object of type settings.
9 calls to merci_load_content_type_settings()
- merci_add_reservation_items in ./
merci.module - Adds items to reservation on creation/update.
- merci_build_reservation_table_form in ./
merci.module - Builds the table of existing reserved items.
- merci_content_type_rules in ./
merci.module - Loads MERCI rules for a content type.
- merci_delete_node_type_validate in ./
merci.module - Validates deletion of node types.
- merci_form_alter in ./
merci.module - Implementation of hook_form_alter().
File
- ./
merci.module, line 1254 - MERCI - Managed Equipment Reservation Checkout and Inventory
Code
function merci_load_content_type_settings($content_type) {
return db_fetch_object(db_query("SELECT nt.type, nt.name, m.type_setting, m.max_hours_per_reservation, m.allow_overnight, m.allow_weekends, m.late_fee_per_hour, m.rate_per_hour, m.fee_free_hours, m.status, m.spare_items, m.min_cancel_hours, m.autocheckout, m.autocheckin, m.selfcheckout FROM {node_type} nt INNER JOIN {merci_node_type} m ON nt.type = m.type WHERE nt.type = '%s'", $content_type));
//return db_fetch_object(db_query("SELECT nt.type, nt.name, m.type_setting, m.max_hours_per_reservation, m.allow_overnight, m.allow_weekends, m.late_fee_per_hour, m.rate_per_hour, m.fee_free_hours, m.status, m.spare_items, m.min_cancel_hours, m.autocheckout, m.autocheckin, m.selfcheckout, m.grouping FROM {node_type} nt INNER JOIN {merci_node_type} m ON nt.type = m.type WHERE nt.type = '%s'", $content_type));
}