From: Marcel Werk Date: Fri, 24 Jun 2016 13:38:59 +0000 (+0200) Subject: It's no longer possible to disable the main menu X-Git-Tag: 3.0.0_Beta_1~1356^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=21e11623064d6c8654cfb0d13067ae23872de099;p=GitHub%2FWoltLab%2FWCF.git It's no longer possible to disable the main menu --- diff --git a/wcfsetup/install/files/acp/templates/pageAdd.tpl b/wcfsetup/install/files/acp/templates/pageAdd.tpl index 6d2f12725a..4478060b4d 100644 --- a/wcfsetup/install/files/acp/templates/pageAdd.tpl +++ b/wcfsetup/install/files/acp/templates/pageAdd.tpl @@ -347,7 +347,7 @@ diff --git a/wcfsetup/install/files/lib/acp/form/PageAddForm.class.php b/wcfsetup/install/files/lib/acp/form/PageAddForm.class.php index 1e2f3ff205..0f60f33e26 100644 --- a/wcfsetup/install/files/lib/acp/form/PageAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PageAddForm.class.php @@ -160,7 +160,7 @@ class PageAddForm extends AbstractForm { // get available languages $this->availableLanguages = LanguageFactory::getInstance()->getLanguages(); - // get boxes + // get available boxes $boxList = new BoxList(); $boxList->sqlOrderBy = 'box.name'; $boxList->readObjects(); @@ -208,6 +208,8 @@ class PageAddForm extends AbstractForm { if (isset($_POST['metaDescription']) && is_array($_POST['metaDescription'])) $this->metaDescription = ArrayUtil::trim($_POST['metaDescription']); if (isset($_POST['metaKeywords']) && is_array($_POST['metaKeywords'])) $this->metaKeywords = ArrayUtil::trim($_POST['metaKeywords']); if (isset($_POST['boxIDs']) && is_array($_POST['boxIDs'])) $this->boxIDs = ArrayUtil::toIntegerArray($_POST['boxIDs']); + $box = Box::getBoxByIdentifier('com.woltlab.wcf.MainMenu'); + if (!in_array($box->boxID, $this->boxIDs)) $this->boxIDs[] = $box->boxID; if (isset($_POST['aclValues']) && is_array($_POST['aclValues'])) $this->aclValues = $_POST['aclValues']; } @@ -448,6 +450,9 @@ class PageAddForm extends AbstractForm { // call saved event $this->saved(); + // show success + WCF::getTPL()->assign('success', true); + // reset variables $this->parentPageID = $this->isDisabled = $this->isLandingPage = 0; $this->applicationPackageID = 1;