From: Marcel Werk Date: Mon, 26 Sep 2016 14:30:06 +0000 (+0200) Subject: Added missing box title validation X-Git-Tag: 3.0.0_Beta_2~120 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6cd1964f962a09f9416f5381fd0976cf22577145;p=GitHub%2FWoltLab%2FWCF.git Added missing box title validation --- diff --git a/wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php b/wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php index eed892230e..fdd3280ac9 100644 --- a/wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php @@ -386,6 +386,18 @@ class BoxAddForm extends AbstractForm { } } + // box title + if ($this->showHeader) { + if ($this->boxType == 'system' || $this->isMultilingual) { + foreach (LanguageFactory::getInstance()->getLanguages() as $language) { + if (empty($this->title[$language->languageID])) throw new UserInputException('title'.$language->languageID); + } + } + else { + if (empty($this->title[0])) throw new UserInputException('title'); + } + } + if ($this->boxController && $this->boxController->getProcessor() instanceof IConditionBoxController) { $this->boxController->getProcessor()->validateConditions(); }