From d4e106f2b34d4300ec743d3f6f7c8d9847c3e406 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Tue, 9 Jan 2018 23:11:49 +0100 Subject: More detailed theming capabilities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will allow clients to easily check if a custom background is used Signed-off-by: Julius Härtl --- apps/theming/lib/ThemingDefaults.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'apps/theming/lib/ThemingDefaults.php') 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; } /** -- cgit v1.2.3