You are here

function modr8_node_delete in modr8 7

Implements hook_node_delete().

File

./modr8.module, line 205
Easy dedicated content moderation

Code

function modr8_node_delete($node) {

  // Delete log entries when a node is deleted, unless it's deleted while
  // in moderation.  In the latter case, we want to retain the log to see
  // which moderator deleted the node and any message they sent.
  if (!$node->moderate) {
    db_delete('modr8_log')
      ->condition('nid', $node->nid)
      ->execute();
  }
}