#211359 by chx: make dead menu items disappear on a Drupal 6 upgrade

6.x
Gábor Hojtsy 2008-01-20 12:47:32 +00:00
parent 0516192b54
commit c3949c505c
1 changed files with 4 additions and 2 deletions

View File

@ -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']);
}