function similarterms_node_delete in Similar By Terms 6
Same name and namespace in other branches
- 7 similarterms.module \similarterms_node_delete()
Function to delete entries from overrides table when a node is deleted
2 calls to similarterms_node_delete()
- similarterms_nodeapi in ./
similarterms.module - Implementation of hook_nodeapi().
- similarterms_node_save in ./
similarterms.module - Function to populate overrides table
File
- ./
similarterms.module, line 452 - Similar By Terms module displays a block with similar content based on taxonomy terms.
Code
function similarterms_node_delete($node, $vid = NULL) {
if (!variable_get('similarterms_override_options', 0)) {
return;
}
$query = "DELETE FROM {similarterms_override} WHERE nid = %d";
$args = array(
$node->nid,
);
if ($vid) {
$query .= " AND vid = %d";
$args[] = $vid;
}
db_query($query, $args);
}