You are here

function _auditfiles_referenced_not_used_batch_delete_process_batch in Audit Files 7.3

Same name and namespace in other branches
  1. 7.4 auditfiles.referencednotused.inc \_auditfiles_referenced_not_used_batch_delete_process_batch()

The batch process for deleting the file.

Parameters

string $reference_id: The ID for keeping track of the reference.

array $context: Used by the Batch API to keep track of and pass data from one operation to the next.

1 string reference to '_auditfiles_referenced_not_used_batch_delete_process_batch'
_auditfiles_referenced_not_used_batch_delete_create_batch in ./auditfiles.referencednotused.inc
Creates the batch for deleting file references from their content.

File

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

Code

function _auditfiles_referenced_not_used_batch_delete_process_batch($reference_id, array &$context) {

  // Process the current file.
  _auditfiles_referenced_not_used_batch_delete_process_file($reference_id);

  // The contents of 'results' are available as $results in the 'finished'
  // function.
  $context['results'][] = $reference_id;

  // Set a progress message.
  $context['message'] = t('Processed reference ID %file_id.', array(
    '%file_id' => $reference_id,
  ));
}