diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-20 12:47:32 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-20 12:47:32 +0000 |
commit | c3949c505cdc26cec137f29b12b0cbd0ff36177e (patch) | |
tree | 743a3f306fcda6380a18f839911a8a285b559d9f | |
parent | 0516192b54949f1aabcde51e381aeeacecd118b5 (diff) | |
download | brdo-c3949c505cdc26cec137f29b12b0cbd0ff36177e.tar.gz brdo-c3949c505cdc26cec137f29b12b0cbd0ff36177e.tar.bz2 |
#211359 by chx: make dead menu items disappear on a Drupal 6 upgrade
-rw-r--r-- | modules/system/system.install | 6 |
1 files changed, 4 insertions, 2 deletions
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']); } |