Always set the request language to the force language

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-05-23 21:19:46 +02:00 committed by Georg Ehrke
parent 0dc1b3e741
commit 4b8a9a37d6
No known key found for this signature in database
GPG Key ID: 9D98FD9380A1CB43
1 changed files with 5 additions and 6 deletions

View File

@ -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;
}
/**