function node_revision_delete_batch_finish in Node Revision Delete 7.3
Same name and namespace in other branches
- 7.2 node_revision_delete.batch.inc \node_revision_delete_batch_finish()
Finishing bulk operations for revision deletion.
Parameters
bool $success: A boolean indicating the operations success.
array $results: The results variables.
array $operations: The operations.
2 string references to 'node_revision_delete_batch_finish'
- drush_node_revision_delete in ./
node_revision_delete.drush.inc - Implements drush_COMMANDFILE_COMMANDNAME().
- node_revision_delete_admin_settings_form_submit in ./
node_revision_delete.admin.inc - Form submit handler for the Node Revision Delete administration form.
File
- ./
node_revision_delete.batch.inc, line 67 - Batch API callbacks for node_revision_delete module.
Code
function node_revision_delete_batch_finish($success, array $results, array $operations) {
if ($success) {
foreach ($results as $nid => $count) {
drupal_set_message(t('Deleted @count revisions for node with nid @nid.', array(
'@count' => $count,
'@nid' => $nid,
)));
}
}
else {
// An error occurred.
// $operations contains the operations that remained unprocessed.
$error_operation = reset($operations);
$message_variables = array(
'%error_operation' => $error_operation[0],
'@arguments' => print_r($error_operation[1], TRUE),
);
$message = t('An error occurred while processing %error_operation with arguments: @arguments', $message_variables);
drupal_set_message($message, 'error');
}
}