summaryrefslogtreecommitdiff
path: root/includes/menu.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/menu.inc')
-rw-r--r--includes/menu.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/menu.inc b/includes/menu.inc
index 435f694d4..87e5b34b8 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -632,7 +632,8 @@ function menu_rebuild() {
$item = &$menu[$path];
$number_parts = $item['_number_parts'];
if (isset($item['parent'])) {
- $parent_parts = explode('/', $menu_path_map[$item['parent']], 6);
+ $item['parent'] = $menu_path_map[$item['parent']];
+ $parent_parts = explode('/', $item['parent'], 6);
$slashes = count($parent_parts) - 1;
}
else {
@@ -723,7 +724,7 @@ function menu_rebuild() {
$item['parent'] = implode('/', array_slice($item['_parts'], 0, $item['_number_parts'] - 1));
}
else {
- $item['_depth'] = $item['parent'] ? $menu[$menu_path_map[$item['parent']]]['_depth'] + 1 : 1;
+ $item['_depth'] = $item['parent'] ? $menu[$item['parent']]['_depth'] + 1 : 1;
}
}
else {