summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-05-23 21:19:46 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-05-23 21:19:46 +0200
commit4286e17777433caac06859c744ff3f3fbbf95e8b (patch)
tree8dd8f467aed769df2b150dcf881465936f400bd5
parent2a21471c74dc5a5e5e9859000316b385007d4d56 (diff)
downloadnextcloud-server-4286e17777433caac06859c744ff3f3fbbf95e8b.tar.gz
nextcloud-server-4286e17777433caac06859c744ff3f3fbbf95e8b.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.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index 74cea7aa843..4f63adce572 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;
}
/**