You are here

function menu_disable_confirm_submit in Drupal 4

File

modules/menu.module, line 494
Allows administrators to customize the site navigation menu.

Code

function menu_disable_confirm_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/menu');
}