You are here

function classified_node_revision_delete in Classified Ads 7.3

Same name and namespace in other branches
  1. 6.3 classified.module \classified_node_revision_delete()

Implements hook_node_revision_delete().

File

./classified.module, line 1402
A pure D7 classified ads module inspired by the ed_classified module.

Code

function classified_node_revision_delete($node) {
  if ($node->type != 'classified') {
    return;
  }
  $ret = db_delete('classified_node')
    ->condition('vid', $node->vid)
    ->execute();

  // PDO errors return NULL, not FALSE on error.
  if (!isset($ret)) {
    watchdog('classified', 'Error deleting revision @vid of node @nid', array(
      '@vid' => $node->vid,
      '@nid' => $node->nid,
    ), WATCHDOG_WARNING, 'node/' . $node->nid);
  }
}