You are here

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

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

File

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

Code

function merci_node_delete($node) {

  // Process active MERCI node types and reservation nodes.
  if (merci_is_merci_type($node->type)) {
    $merci_type = merci_type_setting($node->type);
    $node->merci_placeholder_nid = $node->nid;
    merci_delete_record('merci_reservation_detail', $node, 'merci_placeholder_nid');
    merci_delete_record('merci_' . $merci_type . '_node', $node, 'nid');
    merci_delete_record('merci_reservation_item_node', $node, 'nid');
  }
}