summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-07-09 18:08:15 +0000
committerDries Buytaert <dries@buytaert.net>2007-07-09 18:08:15 +0000
commitc7eef3d27b8c67882f877b246919465127b75c61 (patch)
tree201a60c60ce671e67fbdf8aa2ef244144419239e /includes
parent4ff46202cbf1ef5d071c0eb86c52521a38c6534a (diff)
downloadbrdo-c7eef3d27b8c67882f877b246919465127b75c61.tar.gz
brdo-c7eef3d27b8c67882f877b246919465127b75c61.tar.bz2
- Patch #151055 by pwolanin et al: fixed problems with moving menu items.
Diffstat (limited to 'includes')
-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);