function menu_edit_item_submit in Drupal 6
Same name and namespace in other branches
- 7 modules/menu/menu.admin.inc \menu_edit_item_submit()
Process menu and menu item add/edit form submissions.
File
- modules/
menu/ menu.admin.inc, line 376 - Administrative page callbacks for menu module.
Code
function menu_edit_item_submit($form, &$form_state) {
$item =& $form_state['values']['menu'];
// The value of "hidden" is the opposite of the value
// supplied by the "enabled" checkbox.
$item['hidden'] = (int) (!$item['enabled']);
unset($item['enabled']);
$item['options']['attributes']['title'] = $item['description'];
list($item['menu_name'], $item['plid']) = explode(':', $item['parent']);
if (!menu_link_save($item)) {
drupal_set_message(t('There was an error saving the menu link.'), 'error');
}
$form_state['redirect'] = 'admin/build/menu-customize/' . $item['menu_name'];
}