You are here

function notifications_subscriptions_mass_update in Notifications 6.4

Same name and namespace in other branches
  1. 6 notifications.manage.inc \notifications_subscriptions_mass_update()
  2. 6.2 notifications.manage.inc \notifications_subscriptions_mass_update()
  3. 6.3 notifications.manage.inc \notifications_subscriptions_mass_update()

Make mass update of subscriptions, changing all nodes in the $nodes array to update them with the field values in $updates.

IMPORTANT NOTE: This function is intended to work when called from a form submit handler. Calling it outside of the form submission process may not work correctly.

Parameters

array $subscriptions: Array of subscriptions nid to update.

array $updates: Array of key/value pairs with node field names and the value to update that field to.

2 string references to 'notifications_subscriptions_mass_update'
notifications_destination_subscriptions_operations in includes/destination.inc
Subscription mass operations.
notifications_subscriptions_operations in ./notifications.manage.inc
Subscription mass operations.

File

./notifications.manage.inc, line 367
Common functions for bulk management of subscriptions

Code

function notifications_subscriptions_mass_update($subscriptions, $updates) {
  foreach ($subscriptions as $id) {
    _notifications_subscriptions_mass_update_helper($id, $updates);
  }
  drupal_set_message(t('The update has been performed.'));
}