function classified_update in Classified Ads 6.3
Same name and namespace in other branches
- 7.3 classified.module \classified_update()
Implements hook_update().
File
- ./
classified.module, line 1519 - A pure D6 classified ads module inspired by the ed_classified module.
Code
function classified_update($node) {
if (!empty($node->revision)) {
classified_insert($node);
}
else {
$ret = drupal_write_record('classified_node', $node, array(
'nid',
'vid',
));
if ($ret === FALSE) {
watchdog('classified', 'Error updating ad @nid: "@title"', array(
'@nid' => $node->nid,
'@title' => $node->title,
), WATCHDOG_ERROR, l($node->title, 'node/' . $node->nid));
}
else {
cache_clear_all('classified:overview', 'cache');
}
}
}