Adds missing parent menu item filter
authorMatthias Schmidt <gravatronics@live.com>
Wed, 9 Oct 2013 15:46:26 +0000 (17:46 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 9 Oct 2013 15:46:43 +0000 (17:46 +0200)
wcfsetup/install/files/lib/acp/form/PageMenuItemAddForm.class.php

index 57f4c1e4f8ec1c2ceeb2dd6d4a2f39aec7476a6d..a4c000234a59b3b60c84e24786947538d0b6696b 100644 (file)
@@ -108,6 +108,7 @@ class PageMenuItemAddForm extends AbstractForm {
        protected function initAvailableParentMenuItems() {
                $this->availableParentMenuItems = new PageMenuItemList();
                $this->availableParentMenuItems->getConditionBuilder()->add("page_menu_item.parentMenuItem = ''");
+               $this->availableParentMenuItems->getConditionBuilder()->add('page_menu_item.menuPosition = ?', array('header'));
                $this->availableParentMenuItems->sqlOrderBy = "page_menu_item.showOrder ASC";
        }
        
@@ -170,7 +171,7 @@ class PageMenuItemAddForm extends AbstractForm {
                }
                else {
                        $this->menuItemController = '';
-                               
+                       
                        // validate menu item link
                        if (!I18nHandler::getInstance()->validateValue('menuItemLink')) {
                                throw new UserInputException('menuItemLink');