function _node_mass_update_batch_finished

Same name in other branches
  1. 9 core/modules/node/node.admin.inc \_node_mass_update_batch_finished()
  2. 8.9.x core/modules/node/node.admin.inc \_node_mass_update_batch_finished()
  3. 10 core/modules/node/node.admin.inc \_node_mass_update_batch_finished()
  4. 11.x core/modules/node/node.admin.inc \_node_mass_update_batch_finished()

Implements callback_batch_finished().

Reports the status of batch operation for node_mass_update().

Parameters

bool $success: A boolean indicating whether the batch mass update operation successfully concluded.

int $results: The number of nodes updated via the batch mode process.

array $operations: An array of function calls (not used in this function).

1 string reference to '_node_mass_update_batch_finished'
node_mass_update in modules/node/node.admin.inc
Make mass update of nodes, changing all nodes in the $nodes array to update them with the field values in $updates.

File

modules/node/node.admin.inc, line 384

Code

function _node_mass_update_batch_finished($success, $results, $operations) {
    if ($success) {
        drupal_set_message(t('The update has been performed.'));
    }
    else {
        drupal_set_message(t('An error occurred and processing did not complete.'), 'error');
        $message = format_plural(count($results), '1 item successfully processed:', '@count items successfully processed:');
        $message .= theme('item_list', array(
            'items' => $results,
        ));
        drupal_set_message($message);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.