From: Matthias Schmidt Date: Thu, 8 Aug 2013 08:49:42 +0000 (+0200) Subject: Fixes issues with SmileyAddForm X-Git-Tag: 2.0.0_Beta_7~46^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f165cbfa0d5b628237f268c6abd9136d45fa2357;p=GitHub%2FWoltLab%2FWCF.git Fixes issues with SmileyAddForm --- diff --git a/wcfsetup/install/files/acp/templates/smileyAdd.tpl b/wcfsetup/install/files/acp/templates/smileyAdd.tpl index 759520ec6d..47f3139966 100644 --- a/wcfsetup/install/files/acp/templates/smileyAdd.tpl +++ b/wcfsetup/install/files/acp/templates/smileyAdd.tpl @@ -37,8 +37,8 @@ {if $errorField == 'smileyTitle'} - {if $errorType == 'empty'} - {lang}wcf.global.form.error.empty{/lang} + {if $errorType == 'empty' || $errorType == 'multilingual'} + {lang}wcf.global.form.error.{$errorType}{/lang} {else} {lang}wcf.acp.smiley.smileyTitle.error.{@$errorType}{/lang} {/if} diff --git a/wcfsetup/install/files/lib/acp/form/SmileyAddForm.class.php b/wcfsetup/install/files/lib/acp/form/SmileyAddForm.class.php index 08e1b04d49..15fbc9be5a 100644 --- a/wcfsetup/install/files/lib/acp/form/SmileyAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/SmileyAddForm.class.php @@ -70,7 +70,7 @@ class SmileyAddForm extends AbstractForm { public $aliases = ''; /** - * smileyPath + * path to the smiley file * @var string */ public $smileyPath = ''; @@ -172,6 +172,7 @@ class SmileyAddForm extends AbstractForm { $this->smileyCode = ''; $this->categoryID = 0; $this->showOrder = 0; + $this->smileyPath = ''; I18nHandler::getInstance()->reset(); @@ -189,7 +190,12 @@ class SmileyAddForm extends AbstractForm { // validate title if (!I18nHandler::getInstance()->validateValue('smileyTitle')) { - throw new UserInputException('smileyTitle'); + if (I18nHandler::getInstance()->isPlainValue('smileyTitle')) { + throw new UserInputException('smileyTitle'); + } + else { + throw new UserInputException('smileyTitle', 'multilingual'); + } } if ($this->categoryID) {