You are here

function notifications_subscriptions_mass_update in Notifications 6.2

Same name and namespace in other branches
  1. 6.4 notifications.manage.inc \notifications_subscriptions_mass_update()
  2. 6 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.

1 string reference to 'notifications_subscriptions_mass_update'
notifications_subscriptions_operations in ./notifications.manage.inc
Subscription mass operations.

File

./notifications.manage.inc, line 321
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.'));
}