function merci_node_type_update in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.2
Same name and namespace in other branches
- 6.2 includes/database.inc \merci_node_type_update()
@todo Please document this function.
See also
File
- ./
merci.module, line 1512 - MERCI - Managed Equipment Reservation Checkout and Inventory
Code
function merci_node_type_update($info) {
if (isset($info->old_type) && $info->type != $info->old_type) {
// TODO Please review the conversion of this statement to the D7 database API syntax.
/* db_query("UPDATE {merci_node_type} SET type = '%s' WHERE type = '%s'", $info->type, $info->old_type) */
db_update('merci_node_type')
->fields(array(
'type' => $info->type,
))
->condition('type', $info->old_type)
->execute();
}
merci_node_type_update_variables($info, TRUE);
cache_clear_all('merci_' . $info->type . '_data', 'cache');
cache_clear_all('merci_content_type_info', 'cache');
}