diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-01-09 23:11:49 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-01-10 13:23:22 +0100 |
commit | d4e106f2b34d4300ec743d3f6f7c8d9847c3e406 (patch) | |
tree | 3d8aef6327a538713f66b640a275b1ed70ec6c26 /apps/theming/lib/ThemingDefaults.php | |
parent | 9c017084e50a20591e3b5a5c2842101a540e7fb2 (diff) | |
download | nextcloud-server-d4e106f2b34d4300ec743d3f6f7c8d9847c3e406.tar.gz nextcloud-server-d4e106f2b34d4300ec743d3f6f7c8d9847c3e406.zip |
More detailed theming capabilities
This will allow clients to easily check if a custom background is used
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/theming/lib/ThemingDefaults.php')
-rw-r--r-- | apps/theming/lib/ThemingDefaults.php | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index 05d387e6273..9dcc981817e 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -196,22 +196,13 @@ class ThemingDefaults extends \OC_Defaults { * @return string */ public function getBackground() { - $backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime',false); - - $backgroundExists = true; - try { - $this->appData->getFolder('images')->getFile('background'); - } catch (\Exception $e) { - $backgroundExists = false; - } - $cacheBusterCounter = $this->config->getAppValue('theming', 'cachebuster', '0'); - if(!$backgroundLogo || !$backgroundExists) { - return $this->urlGenerator->imagePath('core','background.png') . '?v=' . $cacheBusterCounter; + if($this->util->isBackgroundThemed()) { + return $this->urlGenerator->linkToRoute('theming.Theming.getLoginBackground') . '?v=' . $cacheBusterCounter; } - return $this->urlGenerator->linkToRoute('theming.Theming.getLoginBackground') . '?v=' . $cacheBusterCounter; + return $this->urlGenerator->imagePath('core','background.png') . '?v=' . $cacheBusterCounter; } /** |