Fixed calculation of active menu items
authorMarcel Werk <burntime@woltlab.com>
Sun, 28 Aug 2016 14:04:26 +0000 (16:04 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 28 Aug 2016 14:04:32 +0000 (16:04 +0200)
wcfsetup/install/files/lib/data/menu/item/MenuItemNodeTree.class.php

index 344f4eda461ba182fff161b863f4aeb90f4e8698..cb7b8f6e2fd4f69527268f0a18365586d521d12b 100644 (file)
@@ -66,8 +66,8 @@ class MenuItemNodeTree {
                if (!RequestHandler::getInstance()->isACPRequest()) {
                        $possibleLocations = PageLocationManager::getInstance()->getLocations();
                        $length = count($possibleLocations);
-                       foreach ($menuItemList as $menuItem) {
-                               for ($i = 0; $i < $length; $i++) {
+                       for ($i = 0; $i < $length; $i++) {
+                               foreach ($menuItemList as $menuItem) {
                                        if ($menuItem->pageID == $possibleLocations[$i]['pageID'] && $menuItem->pageObjectID == $possibleLocations[$i]['pageObjectID']) {
                                                if (!isset($activeMenuItems[$i])) {
                                                        $activeMenuItems[$i] = [];