function heartbeat_nodeapi in Heartbeat 6.4
Implementation of hook_nodeapi().
File
- ./
heartbeat.module, line 434
Code
function heartbeat_nodeapi(&$node, $op, $arg = 0) {
// Delete messages from deleted nodes
// Visa versa could be done custom but at the
// time of writing, i did not implement this.
if ($op == 'delete') {
$result = db_query("SELECT uaid FROM {heartbeat_activity} WHERE nid = %d\n OR nid_target = %d", $node->nid, $node->nid);
while ($row = db_fetch_object($result)) {
_heartbeat_activity_delete($row->uaid);
}
}
}