You are here

function revisioning_node_delete in Revisioning 7

Implements hook_node_delete().

File

./revisioning.module, line 734
Allows content to be updated and reviewed before submitting it for publication, while the current live revision remains unchanged and publicly visible until the changes have been reviewed and found fit for publication by a moderator.

Code

function revisioning_node_delete($node) {
  if ($revisions = node_revision_list($node)) {
    $vids = array_keys($revisions);
    db_delete('file_usage')
      ->condition('module', 'revisioning')
      ->condition('id', $vids, 'IN')
      ->execute();
  }
}