From 6cd1964f962a09f9416f5381fd0976cf22577145 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 26 Sep 2016 16:30:06 +0200 Subject: [PATCH] Added missing box title validation --- .../install/files/lib/acp/form/BoxAddForm.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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(); } -- 2.20.1