You are here

function flag_delete_confirm_submit in Flag 5

Same name and namespace in other branches
  1. 6.2 includes/flag.admin.inc \flag_delete_confirm_submit()
  2. 6 includes/flag.admin.inc \flag_delete_confirm_submit()
  3. 7.3 includes/flag.admin.inc \flag_delete_confirm_submit()
  4. 7.2 includes/flag.admin.inc \flag_delete_confirm_submit()

File

includes/flag.admin.inc, line 433
Contains administrative pages for creating, editing, and deleting flags.

Code

function flag_delete_confirm_submit($form_id, $form_values) {
  $flag = flag_get_flag(NULL, $form_values['fid']);
  if ($form_values['confirm']) {
    $flag
      ->delete();
    $flag
      ->disable();
    _flag_clear_cache();
  }
  drupal_set_message(t('Flag @name has been deleted.', array(
    '@name' => $flag
      ->get_title(),
  )));
  return 'admin/build/flags';
}