function file_entity_edit_delete_submit in File Entity (fieldable files) 7.3
Same name and namespace in other branches
- 7.2 file_entity.pages.inc \file_entity_edit_delete_submit()
Form submission handler for the 'Delete' button for file_entity_edit().
1 string reference to 'file_entity_edit_delete_submit'
- file_entity_edit in ./
file_entity.pages.inc - Page callback: Form constructor for the file edit form.
File
- ./
file_entity.pages.inc, line 1084 - Supports file operations including View, Edit, and Delete.
Code
function file_entity_edit_delete_submit($form, &$form_state) {
$fid = $form_state['values']['fid'];
$destination = array();
if (isset($_GET['destination'])) {
$destination = drupal_get_destination();
unset($_GET['destination']);
}
$form_state['redirect'] = array(
'file/' . $fid . '/delete',
array(
'query' => $destination,
),
);
// Clear the page and block caches.
cache_clear_all();
}