From: Marcel Werk Date: Fri, 8 Apr 2016 14:23:10 +0000 (+0200) Subject: Fixed multiple issues in box management X-Git-Tag: 3.0.0_Beta_1~1942 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fb4b9f702518777b0935c452f39ef386100c33cc;p=GitHub%2FWoltLab%2FWCF.git Fixed multiple issues in box management --- diff --git a/wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php b/wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php index cc867941e6..35c5889e77 100644 --- a/wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php @@ -135,7 +135,7 @@ class BoxAddForm extends AbstractForm { public function readFormParameters() { parent::readFormParameters(); - $this->visibleEverywhere = $this->showOrder = 0; + $this->visibleEverywhere = $this->showHeader = $this->showOrder = 0; if (isset($_POST['name'])) $this->name = StringUtil::trim($_POST['name']); if (isset($_POST['boxType'])) $this->boxType = $_POST['boxType']; if (isset($_POST['position'])) $this->position = $_POST['position']; diff --git a/wcfsetup/install/files/lib/acp/form/MenuAddForm.class.php b/wcfsetup/install/files/lib/acp/form/MenuAddForm.class.php index 3d3a07c8e2..68e9c3ad35 100644 --- a/wcfsetup/install/files/lib/acp/form/MenuAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/MenuAddForm.class.php @@ -95,7 +95,7 @@ class MenuAddForm extends AbstractForm { if (I18nHandler::getInstance()->isPlainValue('title')) $this->title = I18nHandler::getInstance()->getValue('title'); - $this->visibleEverywhere = $this->showOrder = 0; + $this->visibleEverywhere = $this->showHeader = $this->showOrder = 0; if (isset($_POST['position'])) $this->position = $_POST['position']; if (isset($_POST['showOrder'])) $this->showOrder = intval($_POST['showOrder']); if (isset($_POST['visibleEverywhere'])) $this->visibleEverywhere = intval($_POST['visibleEverywhere']); diff --git a/wcfsetup/install/files/lib/data/box/BoxAction.class.php b/wcfsetup/install/files/lib/data/box/BoxAction.class.php index 389451200b..19a91cc33b 100644 --- a/wcfsetup/install/files/lib/data/box/BoxAction.class.php +++ b/wcfsetup/install/files/lib/data/box/BoxAction.class.php @@ -129,9 +129,10 @@ class BoxAction extends AbstractDatabaseObjectAction { foreach ($this->objects as $box) { $deleteStatement->execute([$box->boxID]); + $visibleEverywhere = (isset($this->parameters['data']['visibleEverywhere']) ? $this->parameters['data']['visibleEverywhere'] : $box->visibleEverywhere); foreach ($this->parameters['pageIDs'] as $pageID) { - $insertStatement->execute([$box->boxID, $pageID, ($box->visibleEverywhere ? 0 : 1)]); + $insertStatement->execute([$box->boxID, $pageID, ($visibleEverywhere ? 0 : 1)]); } } }