function subscriptions_content_node_update in Subscriptions 2.0.x
Same name and namespace in other branches
- 7 subscriptions_content.module \subscriptions_content_node_update()
Implements hook_node_update().
Auto-subscribes and queues notifications for updated nodes.
Parameters
object $node:
1 call to subscriptions_content_node_update()
- subscriptions_content_node_admin_nodes_submit in subscriptions_content/
subscriptions_content.module - Handles bulk publishing.
File
- subscriptions_content/
subscriptions_content.module, line 312 - Subscriptions to content events.
Code
function subscriptions_content_node_update($node) {
$unpublished_nids =& drupal_static('subscriptions_content_unpublished_nids', []);
$inserted = FALSE;
if (array_search($node->nid, $unpublished_nids) !== FALSE && $node->status) {
// An unpublished node just became published -- treat this as an 'insert'!
$inserted = TRUE;
}
subscriptions_content_node_insert($node, $inserted);
}