function _auditfiles_not_on_server_batch_delete_create_batch in Audit Files 7.4
Same name and namespace in other branches
- 7.3 auditfiles.notonserver.inc \_auditfiles_not_on_server_batch_delete_create_batch()
Creates the batch for deleting files from the database.
Parameters
array $fileids: The list of file IDs to be processed.
Return value
array The definition of the batch.
1 call to _auditfiles_not_on_server_batch_delete_create_batch()
- auditfiles_not_on_server_form_submit in ./
auditfiles.notonserver.inc - Submit handler for the auditfiles_not_on_server_form form.
File
- ./
auditfiles.notonserver.inc, line 445 - Generates a report showing files in the database, but not on the server.
Code
function _auditfiles_not_on_server_batch_delete_create_batch(array $fileids) {
$batch = _auditfiles_not_on_server_batch_set_common_values();
$batch['title'] = t('Deleting files from the database');
$operations = array();
// Remove all the empty values from the array.
$file_ids = array();
foreach ($fileids as $file_id) {
if ($file_id != 0) {
$file_ids[] = $file_id;
}
}
// Fill in the $operations variable.
foreach ($file_ids as $file_id) {
$operations[] = array(
'_auditfiles_not_on_server_batch_delete_process_batch',
array(
$file_id,
),
);
}
$batch['operations'] = $operations;
return $batch;
}