From 907c080e151f4b6609761935dd3dd3af823c7d12 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 14 Mar 2015 10:55:18 +0100 Subject: [PATCH] Fix UserLanguageCondition::showContent() for guests --- .../system/condition/UserLanguageCondition.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/condition/UserLanguageCondition.class.php b/wcfsetup/install/files/lib/system/condition/UserLanguageCondition.class.php index 894f9449d5..9bf72984ff 100644 --- a/wcfsetup/install/files/lib/system/condition/UserLanguageCondition.class.php +++ b/wcfsetup/install/files/lib/system/condition/UserLanguageCondition.class.php @@ -113,6 +113,14 @@ class UserLanguageCondition extends AbstractSingleFieldCondition implements ICon * @see \wcf\system\condition\IContentCondition::showContent() */ public function showContent(Condition $condition) { - return $this->checkUser($condition, WCF::getUser()); + if (WCF::getUser()->userID) { + return $this->checkUser($condition, WCF::getUser()); + } + + if (!empty($condition->conditionData['languageIDs']) && !in_array(WCF::getLanguage()->languageID, $condition->languageIDs)) { + return false; + } + + return true; } } -- 2.20.1