Forcing landing page to be always accessible
authorAlexander Ebert <ebert@woltlab.com>
Mon, 28 Jan 2013 16:16:50 +0000 (17:16 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 28 Jan 2013 16:16:50 +0000 (17:16 +0100)
Fixes #1111

wcfsetup/install/files/lib/system/menu/page/PageMenu.class.php

index 5f8a9aad0e4775d20cdcff0878c158fde6f664b3..f0b440975ddbf3757b8c1ae8cc83113b458fcff6 100644 (file)
@@ -87,6 +87,11 @@ class PageMenu extends TreeMenu {
         * @see wcf\system\menu\TreeMenu::checkMenuItem()
         */
        protected function checkMenuItem(ITreeMenuItem $item) {
+               // landing page must always be accessible
+               if ($item->isLandingPage) {
+                       return true;
+               }
+               
                if (!parent::checkMenuItem($item)) return false;
                
                return $item->getProcessor()->isVisible();