From c3949c505cdc26cec137f29b12b0cbd0ff36177e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Sun, 20 Jan 2008 12:47:32 +0000 Subject: #211359 by chx: make dead menu items disappear on a Drupal 6 upgrade --- modules/system/system.install | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/system/system.install') diff --git a/modules/system/system.install b/modules/system/system.install index cae51cbde..36aa6e566 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -1810,13 +1810,15 @@ function system_update_6021() { // Items created via the menu module need to be assigned to it. if ($item['type'] & MENU_CREATED_BY_ADMIN) { $item['module'] = 'menu'; + $item['router_path'] = ''; + $item['updated'] = TRUE; } else { $item['module'] = 'system'; + $item['router_path'] = $item['path']; + $item['updated'] = FALSE; } - $item['updated'] = TRUE; // Save the link. - $item['router_path'] = ''; menu_link_save($item); $_SESSION['menu_item_map'][$item['mid']] = array('mlid' => $item['mlid'], 'menu_name' => $item['menu_name']); } -- cgit v1.2.3