function menu_confirm_disable_item_submit in Drupal 5
File
- modules/
menu/ menu.module, line 498 - Allows administrators to customize the site navigation menu.
Code
function menu_confirm_disable_item_submit($form_id, $form_values) {
$type = $form_values['item']['type'];
$type &= ~MENU_VISIBLE_IN_TREE;
$type &= ~MENU_VISIBLE_IN_BREADCRUMB;
$type |= MENU_MODIFIED_BY_ADMIN;
db_query('UPDATE {menu} SET type = %d WHERE mid = %d', $type, $form_values['mid']);
drupal_set_message(t('The menu item has been disabled.'));
drupal_goto('admin/build/menu');
}