You are here

function file_entity_multiple_delete_confirm_submit in File Entity (fieldable files) 7.2

Same name and namespace in other branches
  1. 7.3 file_entity.admin.inc \file_entity_multiple_delete_confirm_submit()
  2. 7 file_entity.pages.inc \file_entity_multiple_delete_confirm_submit()

Submit handler for delete confirmation.

1 string reference to 'file_entity_multiple_delete_confirm_submit'
file_entity_multiple_delete_confirm in ./file_entity.admin.inc
File entity delete confirmation.

File

./file_entity.admin.inc, line 557

Code

function file_entity_multiple_delete_confirm_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    file_delete_multiple(array_keys($form_state['values']['files']));
    $count = count($form_state['values']['files']);
    watchdog('file_entity', 'Deleted @count files.', array(
      '@count' => $count,
    ));
    drupal_set_message(format_plural($count, 'Deleted 1 file.', 'Deleted @count files.'));
  }
  $form_state['redirect'] = 'admin/content/file';
}