menu_confirm_disable_item_submit

Versions
5
menu_confirm_disable_item_submit($form_id, $form_values)

Code

modules/menu/menu.module, line 498

<?php
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');
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.