You are here

function menu_position_delete_rule_form_submit in Menu Position 6

Same name and namespace in other branches
  1. 7.2 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 581
Provides infrequently used functions and hooks for menu_position.

Code

function menu_position_delete_rule_form_submit($form, &$form_state) {
  $title = db_result(db_query('SELECT admin_title FROM {menu_position_rules} WHERE rid = %d', $form_state['values']['rid']));
  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/build/menu-position';
}