You are here

function merci_node_type in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6

Same name and namespace in other branches
  1. 6.2 merci.module \merci_node_type()

Implementation of hook_node_info().

1 string reference to 'merci_node_type'
merci_views_default_views in ./merci.views_default.inc
Implementation of hook_views_default_views().

File

./merci.module, line 801
MERCI - Managed Equipment Reservation Checkout and Inventory

Code

function merci_node_type($op, $info) {
  switch ($op) {
    case 'update':

      // If type was edited, update it.
      if (isset($info->old_type) && $info->type != $info->old_type) {
        db_query("UPDATE {merci_node_type} SET type = '%s' WHERE type = '%s'", $info->type, $info->old_type);
      }
      break;
    case 'delete':
      db_query("DELETE FROM {merci_node_type} WHERE type = '%s'", $info->type);
      break;
  }
}