You are here

function classified_delete in Classified Ads 6.3

Same name and namespace in other branches
  1. 7.3 classified.module \classified_delete()

Implements hook_delete().

File

./classified.module, line 842
A pure D6 classified ads module inspired by the ed_classified module.

Code

function classified_delete($node) {
  $sq = 'DELETE FROM {classified_node} WHERE nid = %d';
  $ret = db_query($sq, $node->nid);
  if ($ret === FALSE) {
    watchdog('classified', 'Error deleting node @nid: @title', array(
      '@nid' => $node->nid,
      '@title' => $node->title,
    ), WATCHDOG_ERROR, l($node->title, 'node/' . $node->nid));
  }
  else {
    cache_clear_all('classified:overview', 'cache');
  }
}