You are here

function purl_menu_edit_submit in Persistent URL 6

Same name and namespace in other branches
  1. 7 purl.admin.inc \purl_menu_edit_submit()
1 string reference to 'purl_menu_edit_submit'
_purl_form_alter in ./purl.admin.inc
Private implementation of hook_form_alter()

File

./purl.admin.inc, line 235
Admin pages for the purl module.

Code

function purl_menu_edit_submit($form, &$form_state) {
  $menu = $form_state['values'];
  $tree = menu_tree_all_data($menu['menu_name']);

  // Recurse through all items and set each.
  _purl_menu_edit_submit_recurse($tree, $menu['purl']['rewrite']);
  menu_cache_clear($menu['menu_name']);
  if ($menu['purl']['rewrite'] == 'disabled') {
    variable_set('purl_menu_behavior_' . $menu['menu_name'], 'disabled');
  }
  else {
    variable_del('purl_menu_behavior_' . $menu['menu_name']);
  }
}