From: Marcel Werk Date: Wed, 1 May 2013 17:36:16 +0000 (+0200) Subject: Fixed issues in page menu administration X-Git-Tag: 2.0.0_Beta_1~268 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7bbc452daea5a6cd01494d4dec36b1602631fb62;p=GitHub%2FWoltLab%2FWCF.git Fixed issues in page menu administration --- diff --git a/wcfsetup/install/files/acp/templates/pageMenuItemAdd.tpl b/wcfsetup/install/files/acp/templates/pageMenuItemAdd.tpl index 4a8f040419..4750e11f95 100644 --- a/wcfsetup/install/files/acp/templates/pageMenuItemAdd.tpl +++ b/wcfsetup/install/files/acp/templates/pageMenuItemAdd.tpl @@ -60,8 +60,8 @@ -
-
+ +
{lang}wcf.acp.pageMenu.data{/lang} @@ -194,11 +194,11 @@
{event name='fields'} - -
- -
- -
+
+ +
+ +
+ {include file='footer'} diff --git a/wcfsetup/install/files/lib/acp/form/PageMenuItemEditForm.class.php b/wcfsetup/install/files/lib/acp/form/PageMenuItemEditForm.class.php index eb3c43a1a4..ed8317061c 100644 --- a/wcfsetup/install/files/lib/acp/form/PageMenuItemEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PageMenuItemEditForm.class.php @@ -109,6 +109,14 @@ class PageMenuItemEditForm extends PageMenuItemAddForm { ))); $this->objectAction->executeAction(); + // update children + if ($this->menuItem->menuPosition == 'header' && $this->menuPosition != 'header') { + $sql = "UPDATE wcf".WCF_N."_page_menu_item + SET parentMenuItem = '' + WHERE parentMenuItem = ?"; + $statement = WCF::getDB()->prepareStatement($sql); + $statement->execute(array($this->menuItem->menuItem)); + } $this->saved(); WCF::getTPL()->assign('success', true); diff --git a/wcfsetup/install/files/lib/acp/page/PageMenuItemListPage.class.php b/wcfsetup/install/files/lib/acp/page/PageMenuItemListPage.class.php index d92df71cb1..7aae2e95ae 100644 --- a/wcfsetup/install/files/lib/acp/page/PageMenuItemListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/PageMenuItemListPage.class.php @@ -59,7 +59,9 @@ class PageMenuItemListPage extends AbstractPage { } else { if ($menuItem->parentMenuItem) { - $this->headerItems[$menuItem->parentMenuItem]->addChild($menuItem); + if (isset($this->headerItems[$menuItem->parentMenuItem])) { + $this->headerItems[$menuItem->parentMenuItem]->addChild($menuItem); + } } else { $this->headerItems[$menuItem->menuItem] = new ViewablePageMenuItem($menuItem);