From 4b8a9a37d61c00b8d4ff4c816e545c3174969cbb Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Wed, 23 May 2018 21:19:46 +0200 Subject: [PATCH] Always set the request language to the force language Signed-off-by: Roeland Jago Douma --- lib/private/L10N/Factory.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php index 658a8793c69..10d6804d747 100644 --- a/lib/private/L10N/Factory.php +++ b/lib/private/L10N/Factory.php @@ -126,14 +126,13 @@ class Factory implements IFactory { * @return string language If nothing works it returns 'en' */ public function findLanguage($app = null) { - if ($this->requestLanguage !== '' && $this->languageExists($app, $this->requestLanguage)) { - return $this->requestLanguage; + $forceLang = $this->config->getSystemValue('force_language', false); + if (is_string($forceLang)) { + $this->requestLanguage = $forceLang; } - $forceLang = $this->config->getSystemValue('force_language', false); - if (is_string($forceLang) && $this->languageExists($app, $forceLang)) { - $this->requestLanguage = $forceLang; - return $forceLang; + if ($this->requestLanguage !== '' && $this->languageExists($app, $this->requestLanguage)) { + return $this->requestLanguage; } /**