You are here

function _auditfiles_merge_file_references_batch_merge_process_batch in Audit Files 7.3

The batch process for deleting the file.

Parameters

int $file_being_kept: The file ID of the file to merge the other into.

int $file_being_merged: The file ID of the file to merge.

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_merge_file_references_batch_merge_process_batch'
_auditfiles_merge_file_references_batch_merge_create_batch in ./auditfiles.mergefilereferences.inc
Creates the batch for merging files.

File

./auditfiles.mergefilereferences.inc, line 702
Generates a report showing & allowing for merging potential duplicate files.

Code

function _auditfiles_merge_file_references_batch_merge_process_batch($file_being_kept, $file_being_merged, array &$context) {

  // Process the current file.
  _auditfiles_merge_file_references_batch_merge_process_file($file_being_kept, $file_being_merged);

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

  // Set a progress message.
  $context['message'] = t('Merged file ID %file_being_merged into file ID %file_being_kept.', array(
    '%file_being_kept' => $file_being_kept,
    '%file_being_merged' => $file_being_merged,
  ));
}