You are here

function merci_node_update in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6.2

Same name and namespace in other branches
  1. 7.2 merci.module \merci_node_update()
1 call to merci_node_update()
merci_nodeapi in ./merci.module
Implementation of hook_nodeapi().

File

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

Code

function merci_node_update($node) {

  // Process active MERCI node types and reservation nodes.
  if (merci_is_merci_type($node->type)) {
    $merci_type = merci_type_setting($node->type);
    if ($node->revision) {
      drupal_write_record('merci_' . $merci_type . '_node', $node);
      drupal_write_record('merci_reservation_item_node', $node);
    }
    else {
      drupal_write_record('merci_' . $merci_type . '_node', $node, 'vid');
      drupal_write_record('merci_reservation_item_node', $node, 'vid');
    }
  }
}