function nodejs_subscribe_node_delete in Node.js integration 6
Same name and namespace in other branches
- 7 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 289
Code
function nodejs_subscribe_node_delete($node) {
db_query('DELETE FROM {nodejs_subscribe_node} WHERE nid = %d', $node->nid);
if (nodejs_subscribe_is_node_subscribed_to($node->nid)) {
nodejs_subscribe_send_notification($node, 'deleted');
}
}