You are here

function forum_node_delete in Drupal 7

Implements hook_node_delete().

File

modules/forum/forum.module, line 414
Provides discussion forums.

Code

function forum_node_delete($node) {
  if (_forum_node_check_node_type($node)) {
    db_delete('forum')
      ->condition('nid', $node->nid)
      ->execute();
    db_delete('forum_index')
      ->condition('nid', $node->nid)
      ->execute();
  }
}