You are here

function subscriptions_content_node_admin_nodes_submit in Subscriptions 6

Same name and namespace in other branches
  1. 5.2 subscriptions_content.module \subscriptions_content_node_admin_nodes_submit()
  2. 7 subscriptions_content.module \subscriptions_content_node_admin_nodes_submit()
  3. 2.0.x subscriptions_content/subscriptions_content.module \subscriptions_content_node_admin_nodes_submit()

Handle bulk publishing.

2 string references to 'subscriptions_content_node_admin_nodes_submit'
subscriptions_content_form_node_admin_content_alter in ./subscriptions_content.module
Implementation of hook_form_alter().
subscriptions_content_form_node_admin_nodes_alter in ./subscriptions_content.module
Implementation of hook_form_alter().

File

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

Code

function subscriptions_content_node_admin_nodes_submit($form, &$form_state) {
  if ($form_state['values']['operation'] == 'publish') {
    if (!$form_state['values']['subscriptions_notify']) {
      subscriptions_content_suppress_notifications(TRUE);
      return;
    }
    foreach ($form_state['values']['nodes'] as $nid) {
      if ($nid != 0 && ($node = node_load($nid)) && !$node->status) {
        subscriptions_content_nodeapi($node, 'prepare');
        subscriptions_content_nodeapi($node, 'update', TRUE);

        // (avoid autosubscribe)
      }
    }
  }
}