function flag_delete_confirm_submit in Flag 6.2
Same name and namespace in other branches
- 5 includes/flag.admin.inc \flag_delete_confirm_submit()
- 6 includes/flag.admin.inc \flag_delete_confirm_submit()
- 7.3 includes/flag.admin.inc \flag_delete_confirm_submit()
- 7.2 includes/flag.admin.inc \flag_delete_confirm_submit()
File
- includes/
flag.admin.inc, line 592 - Contains administrative pages for creating, editing, and deleting flags.
Code
function flag_delete_confirm_submit($form, &$form_state) {
$flag = flag_get_flag(NULL, $form_state['values']['fid']);
if ($form_state['values']['confirm']) {
$flag
->delete();
$flag
->disable();
_flag_clear_cache();
}
drupal_set_message(t('Flag @name has been deleted.', array(
'@name' => $flag
->get_title(),
)));
$form_state['redirect'] = 'admin/build/flags';
}