You are here

function menu_position_delete_rule_form_submit in Menu Position 7.2

Same name and namespace in other branches
  1. 6 menu_position.admin.inc \menu_position_delete_rule_form_submit()
  2. 7 menu_position.admin.inc \menu_position_delete_rule_form_submit()

Handles form submission for menu_position_delete_rule_form().

File

./menu_position.admin.inc, line 632
Provides infrequently used functions and hooks for menu_position.

Code

function menu_position_delete_rule_form_submit($form, &$form_state) {
  $title = db_query('SELECT admin_title FROM {menu_position_rules} WHERE rid = :rid', array(
    ':rid' => $form_state['values']['rid'],
  ))
    ->fetchField();
  menu_position_delete_rule($form_state['values']['rid']);
  drupal_set_message(t('The %title rule has been deleted.', array(
    '%title' => $title,
  )));
  $form_state['redirect'] = 'admin/structure/menu-position';
}