diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-05-23 21:19:46 +0200 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2018-05-24 13:08:10 +0200 |
commit | 930c11a6cd992879c5f87ae814071ecf72ad3c48 (patch) | |
tree | 67427b4ed80156c70cc797966960d8b1709511e7 | |
parent | 0493d0e3fbe5c88acd2d3233e51f053202b30eb6 (diff) | |
download | nextcloud-server-930c11a6cd992879c5f87ae814071ecf72ad3c48.tar.gz nextcloud-server-930c11a6cd992879c5f87ae814071ecf72ad3c48.zip |
Always set the request language to the force language
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r-- | lib/private/L10N/Factory.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php index 86dca2be280..dee15b0d843 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->languageExists($app, $forceLang)) { + if (is_string($forceLang)) { $this->requestLanguage = $forceLang; - return $forceLang; + } + + if ($this->requestLanguage !== '' && $this->languageExists($app, $this->requestLanguage)) { + return $this->requestLanguage; } /** |