You are here

function _auditfiles_used_not_referenced_batch_finish_batch in Audit Files 7.4

Same name and namespace in other branches
  1. 7.3 auditfiles.usednotreferenced.inc \_auditfiles_used_not_referenced_batch_finish_batch()

The function that is called when the batch is complete.

1 string reference to '_auditfiles_used_not_referenced_batch_finish_batch'
_auditfiles_used_not_referenced_batch_set_common_values in ./auditfiles.usednotreferenced.inc
Adds vaules to a batch definition that are common to all batches in the file.

File

./auditfiles.usednotreferenced.inc, line 283
Generates report showing files in file_usage, but not referenced by content.

Code

function _auditfiles_used_not_referenced_batch_finish_batch($success, $results, $operations) {
  if ($success) {
    if (!empty($results['files_to_display'])) {

      // Save the gathered data for display.
      variable_set('auditfiles_files_to_display', $results['files_to_display']);
    }
  }
  else {

    // An error occurred.
    // $operations contains the operations that remained unprocessed.
    $error_operation = reset($operations);
    drupal_set_message(t('An error occurred while processing @operation with arguments : @args', array(
      '@operation' => $error_operation[0],
      '@args' => print_r($error_operation[0], TRUE),
    )));
  }
}