You are here

function menu_token_edit_item_form_submit in Menu Token 5

Process menu and menu item add/edit form submissions.

Overrides menu_token_edit_item_form_submit().

1 string reference to 'menu_token_edit_item_form_submit'
menu_token_form_alter in ./menu_token.module
Implementation of hook_form_alter().

File

./menu_token.module, line 44

Code

function menu_token_edit_item_form_submit($form_id, $form_values) {
  $form_values['mid'] = menu_edit_item_save($form_values);
  $token_enabled = variable_get('menu_token_enabled', array());
  if (isset($form_values['token_enabled']) ? $form_values['token_enabled'] : FALSE) {
    $token_enabled[$form_values['mid']] = $form_values['path'];
  }
  else {
    unset($token_enabled[$form_values['mid']]);
  }
  variable_set('menu_token_enabled', $token_enabled);
  return 'admin/build/menu';
}