function nodejs_subscribe_node_delete in Node.js integration 7
Same name and namespace in other branches
- 6 nodejs_subscribe/nodejs_subscribe.module \nodejs_subscribe_node_delete()
Implements hook_node_delete().
TODO: When a node is deleted, delete subscriptions of all users on this node.
File
- nodejs_subscribe/
nodejs_subscribe.module, line 200
Code
function nodejs_subscribe_node_delete($node) {
db_query('DELETE FROM {nodejs_subscribe_node} WHERE nid = :nid', array(
':nid' => $node->nid,
));
if (nodejs_subscribe_is_node_subscribed_to($node->nid)) {
nodejs_subscribe_send_notification($node, 'deleted');
}
}