summaryrefslogtreecommitdiff
path: root/includes/menu.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/menu.inc')
-rw-r--r--includes/menu.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/menu.inc b/includes/menu.inc
index b77c45d18..c1344aa83 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -1361,9 +1361,11 @@ function _menu_navigation_links_rebuild($menu) {
array_multisort($sort, SORT_NUMERIC, $menu_links);
foreach ($menu_links as $item) {
- $existing_item = db_fetch_array(db_query("SELECT mlid, customized FROM {menu_links} WHERE menu_name = '%s' AND link_path = '%s' AND module = 'system'", $item['menu_name'], $item['link_path']));
+ $existing_item = db_fetch_array(db_query("SELECT mlid, menu_name, plid, customized FROM {menu_links} WHERE link_path = '%s' AND module = 'system'", $item['link_path']));
if ($existing_item) {
$item['mlid'] = $existing_item['mlid'];
+ $item['menu_name'] = $existing_item['menu_name'];
+ $item['plid'] = $existing_item['plid'];
}
if (!$existing_item || !$existing_item['customized']) {
menu_link_save($item);