From: Alexander Ebert Date: Wed, 25 Sep 2013 19:19:14 +0000 (+0200) Subject: Fixed i18n validation for setups with only one available language X-Git-Tag: 2.0.0_Beta_10~6^2~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a362bb4ccdcab6e992a4f10f255e43a3636f18de;p=GitHub%2FWoltLab%2FWCF.git Fixed i18n validation for setups with only one available language --- diff --git a/wcfsetup/install/files/lib/system/language/I18nHandler.class.php b/wcfsetup/install/files/lib/system/language/I18nHandler.class.php index 20be5d4510..56207d1137 100644 --- a/wcfsetup/install/files/lib/system/language/I18nHandler.class.php +++ b/wcfsetup/install/files/lib/system/language/I18nHandler.class.php @@ -214,6 +214,11 @@ class I18nHandler extends SingletonFactory { * @return boolean */ public function validateValue($elementID, $requireI18n = false, $permitEmptyValue = false) { + // do not force i18n if only one language is available + if ($requireI18n && count($this->availableLanguages) == 1) { + $requireI18n = false; + } + if ($this->isPlainValue($elementID)) { // plain values may be left empty if ($permitEmptyValue) {