function auditfiles_multiple_delete_confirm_submit in Audit Files 6.3
Same name and namespace in other branches
- 5 auditfiles.module \auditfiles_multiple_delete_confirm_submit()
- 6.2 notindb.admin.inc \auditfiles_multiple_delete_confirm_submit()
Form action: Delete selected files
1 string reference to 'auditfiles_multiple_delete_confirm_submit'
- auditfiles_multiple_delete_confirm in ./
notindb.admin.inc - Form action: Confirm deletion of selected items
File
- ./
notindb.admin.inc, line 159 - Callback and functions to generate files not in database report
Code
function auditfiles_multiple_delete_confirm_submit($form, &$form_state) {
if ($form_state['values']['confirm']) {
foreach ($form_state['values']['files'] as $file) {
if (file_delete(file_create_path($file))) {
watchdog('audit', '%file was deleted', array(
'%file' => $file,
));
}
else {
drupal_set_message(t('Failed to delete %file', array(
'%file' => $file,
)));
}
}
drupal_set_message(t('The items have been deleted.'));
}
$form_state['redirect'] = 'admin/reports/auditfiles/notindb';
return;
}