You are here

function pmorganization_node_delete in Drupal PM (Project Management) 7.3

Same name and namespace in other branches
  1. 8 pmorganization/pmorganization.module \pmorganization_node_delete()

Implements hook_node_delete().

Related topics

File

pmorganization/pmorganization.module, line 193
Main module file for PM Organization.

Code

function pmorganization_node_delete($node) {

  // Clean up the {pmorganization_index} table when nodes are deleted.
  pmorganization_delete_node_index($node);
  if (variable_get('pmorganization_maintain_index_table', TRUE) and $node->type == 'pmorganization') {

    // Clean up the {pmorganization_index} table when pmorganization is deleted.
    db_delete('pmorganization_index')
      ->condition('pmorganization_nid', $node->nid)
      ->execute();
  }
}