You are here

function subscriptions_content_node_update in Subscriptions 7

Same name and namespace in other branches
  1. 2.0.x subscriptions_content/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.module
Handles bulk publishing.

File

./subscriptions_content.module, line 310
Subscriptions to content events

Code

function subscriptions_content_node_update($node) {
  $unpublished_nids =& drupal_static('subscriptions_content_unpublished_nids', array());
  $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);
}