summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-10-25 13:31:19 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2019-10-25 13:31:19 +0200
commite71f2220821974aaf2f2b3357c0505e13a541b5a (patch)
tree6027904602224faec1042d685bef49750ac12673 /lib
parent6a560fd51eee392c9cbcca91eea3f2bb6a307f0c (diff)
downloadnextcloud-server-e71f2220821974aaf2f2b3357c0505e13a541b5a.tar.gz
nextcloud-server-e71f2220821974aaf2f2b3357c0505e13a541b5a.zip
Cleanup theming mess
* Do not do translations in the constructor. This gets called to early so there is no user yet. Which means we can't obtain the locale. Which means we store the wrong translation instance. * Same for the theming app magic. Just use the parent call when needed. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/legacy/defaults.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/legacy/defaults.php b/lib/private/legacy/defaults.php
index d313366abe7..8633113ba5a 100644
--- a/lib/private/legacy/defaults.php
+++ b/lib/private/legacy/defaults.php
@@ -52,7 +52,6 @@ class OC_Defaults {
private $defaultTextColorPrimary;
public function __construct() {
- $l10n = \OC::$server->getL10N('lib');
$config = \OC::$server->getConfig();
$this->defaultEntity = 'Nextcloud'; /* e.g. company name, used for footers and copyright notices */
@@ -65,7 +64,6 @@ class OC_Defaults {
$this->defaultAndroidClientUrl = $config->getSystemValue('customclient_android', 'https://play.google.com/store/apps/details?id=com.nextcloud.client');
$this->defaultDocBaseUrl = 'https://docs.nextcloud.com';
$this->defaultDocVersion = \OC_Util::getVersion()[0]; // used to generate doc links
- $this->defaultSlogan = $l10n->t('a safe home for all your data');
$this->defaultColorPrimary = '#0082c9';
$this->defaultTextColorPrimary = '#ffffff';
@@ -219,6 +217,10 @@ class OC_Defaults {
if ($this->themeExist('getSlogan')) {
return $this->theme->getSlogan();
} else {
+ if ($this->defaultSlogan === null) {
+ $l10n = \OC::$server->getL10N('lib');
+ $this->defaultSlogan = $l10n->t('a safe home for all your data');
+ }
return $this->defaultSlogan;
}
}