function fancy_file_delete_batch_delete_finished in Fancy File Delete 7
Batch finished.
2 string references to 'fancy_file_delete_batch_delete_finished'
- fancy_file_delete_drush_batch_delete_process in ./
fancy_file_delete.drush.inc - Run fancy file delete.
- _fancy_file_delete_batch_delete_run in includes/
fancy_file_delete.admin.inc - The batch operations to run for either function.
File
- includes/
fancy_file_delete.batch_delete.inc, line 69 - Batch function.
Code
function fancy_file_delete_batch_delete_finished($success, $results, $operations) {
if ($success) {
// Reset the cache
entity_get_controller('file')
->resetCache();
// Handle errors.
if (!empty($results['error'])) {
foreach ($results['error'] as $error) {
drupal_set_message($error['message'], 'warning');
}
unset($results['error']);
}
$message = format_plural(count($results), 'One file cleansed.', '@count files cleansed.');
}
else {
$message = t('Assimilation was futile!');
}
drupal_set_message($message);
// Return to the overview page if the batch was initiated from the UI.
if (!drupal_is_cli()) {
drupal_goto('admin/config/content/fancy_file_delete');
}
}