#211359 by chx: make dead menu items disappear on a Drupal 6 upgrade
parent
0516192b54
commit
c3949c505c
|
@ -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']);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue