aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming/lib/ThemingDefaults.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/theming/lib/ThemingDefaults.php')
-rw-r--r--apps/theming/lib/ThemingDefaults.php15
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;
}
/**