summaryrefslogtreecommitdiffstats
path: root/apps/theming/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-05-05 00:32:32 -0300
committerMorris Jobke <hey@morrisjobke.de>2017-05-05 00:37:32 -0300
commitac04fb8277c5a1b8c33eca9569a644b78c6f12e1 (patch)
treefdbffab8525e270d36283a2cf418636f372b9d09 /apps/theming/lib
parent619d09529c417df10ac57815024b89dee9285c35 (diff)
downloadnextcloud-server-ac04fb8277c5a1b8c33eca9569a644b78c6f12e1.tar.gz
nextcloud-server-ac04fb8277c5a1b8c33eca9569a644b78c6f12e1.zip
Fix invalid theming URLs
* logo and background image had the cache buster applied twice: background-image: url(http://192.168.99.100/server/core/img/logo.svg?v=0?v=0); Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/theming/lib')
-rw-r--r--apps/theming/lib/ThemingDefaults.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php
index 2935355f26d..39547af4916 100644
--- a/apps/theming/lib/ThemingDefaults.php
+++ b/apps/theming/lib/ThemingDefaults.php
@@ -165,11 +165,13 @@ class ThemingDefaults extends \OC_Defaults {
$backgroundExists = false;
}
+ $cacheBusterCounter = $this->config->getAppValue('theming', 'cachebuster', '0');
+
if(!$backgroundLogo || !$backgroundExists) {
- return $this->urlGenerator->imagePath('core','background.jpg');
+ return $this->urlGenerator->imagePath('core','background.jpg') . '?v=' . $cacheBusterCounter;
}
- return $this->urlGenerator->linkToRoute('theming.Theming.getLoginBackground');
+ return $this->urlGenerator->linkToRoute('theming.Theming.getLoginBackground') . '?v=' . $cacheBusterCounter;
}