You are here

function _auditfiles_managed_not_used_batch_delete_process_batch in Audit Files 7.4

Same name and namespace in other branches
  1. 7.3 auditfiles.managednotused.inc \_auditfiles_managed_not_used_batch_delete_process_batch()

The batch process for deleting the file.

Parameters

int $file_id: The ID of a file to delete.

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_managed_not_used_batch_delete_process_batch'
_auditfiles_managed_not_used_batch_delete_create_batch in ./auditfiles.managednotused.inc
Creates the batch for deleting files from the file_managed table.

File

./auditfiles.managednotused.inc, line 468
Generates a report showing files in file_managed, but not in file_usage.

Code

function _auditfiles_managed_not_used_batch_delete_process_batch($file_id, array &$context) {

  // Process the current file.
  _auditfiles_managed_not_used_batch_delete_process_file($file_id);

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

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