Commit c3949c50 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

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

parent 0516192b
......@@ -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']);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment