function discussthis_node_delete in Discuss This! 7.2
Same name and namespace in other branches
- 7 discussthis.node.inc \discussthis_node_delete()
Implements hook_node_delete().
File
- ./
discussthis.node.inc, line 87 - File with node discussion display methods.
Code
function discussthis_node_delete($node) {
// drop any reference to that node
//
// PROBLEM: Note that if someone just initiated a "Discuss this"
// form, then they will have a surprise when saving since the
// page will be gone. I don't see any way around that though.
//
$sql = 'DELETE FROM {discussthis} WHERE nid = %d OR topic_nid = %d';
db_delete('discussthis')
->condition('nid', $node->nid)
->execute();
}