function nodejs_subscribe_node_insert in Node.js integration 6
Same name and namespace in other branches
- 7 nodejs_subscribe/nodejs_subscribe.module \nodejs_subscribe_node_insert()
Implements hook_node_insert().
File
- nodejs_subscribe/
nodejs_subscribe.module, line 246
Code
function nodejs_subscribe_node_insert($node) {
if (isset($node->nodejs_subscribe)) {
if ($node->nodejs_subscribe['nodejs_subscriptions_allowed']) {
db_query('INSERT INTO {nodejs_subscribe_node} (nid, subscribe) VALUES (%d, %d)', $node->nid, 1);
}
}
}