From 092f84d8eb604de93db66d76f5b6ad8baa7040b3 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 27 Apr 2016 10:51:36 +0200 Subject: [PATCH] Fixed an ACP issue --- .../data/menu/item/MenuItemNodeTree.class.php | 22 +++++++++++-------- .../system/page/PageLocationManager.class.php | 1 - 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/wcfsetup/install/files/lib/data/menu/item/MenuItemNodeTree.class.php b/wcfsetup/install/files/lib/data/menu/item/MenuItemNodeTree.class.php index 4afdeba382..8a3209a5b5 100644 --- a/wcfsetup/install/files/lib/data/menu/item/MenuItemNodeTree.class.php +++ b/wcfsetup/install/files/lib/data/menu/item/MenuItemNodeTree.class.php @@ -1,6 +1,7 @@ getLocations(); - $length = count($possibleLocations); - foreach ($menuItemList as $menuItem) { - for ($i = 0; $i < $length; $i++) { - if ($menuItem->pageID == $possibleLocations[$i]['pageID'] && $menuItem->pageObjectID == $possibleLocations[$i]['pageObjectID']) { - if (!isset($activeMenuItems[$i])) { - $activeMenuItems[$i] = []; + + if (!RequestHandler::getInstance()->isACPRequest()) { + $possibleLocations = PageLocationManager::getInstance()->getLocations(); + $length = count($possibleLocations); + foreach ($menuItemList as $menuItem) { + for ($i = 0; $i < $length; $i++) { + if ($menuItem->pageID == $possibleLocations[$i]['pageID'] && $menuItem->pageObjectID == $possibleLocations[$i]['pageObjectID']) { + if (!isset($activeMenuItems[$i])) { + $activeMenuItems[$i] = []; + } + + $activeMenuItems[$i][] = $menuItem->itemID; } - - $activeMenuItems[$i][] = $menuItem->itemID; } } } diff --git a/wcfsetup/install/files/lib/system/page/PageLocationManager.class.php b/wcfsetup/install/files/lib/system/page/PageLocationManager.class.php index 845a2c5b07..c2f27e6182 100644 --- a/wcfsetup/install/files/lib/system/page/PageLocationManager.class.php +++ b/wcfsetup/install/files/lib/system/page/PageLocationManager.class.php @@ -36,7 +36,6 @@ class PageLocationManager extends SingletonFactory { } $metaData = $activeRequest->getMetaData(); - $link = $title = ''; $page = null; if (isset($metaData['cms'])) { $pageID = $metaData['cms']['pageID']; -- 2.20.1