diff options
author | Julius Haertl <jus@bitgrid.net> | 2016-08-25 16:19:22 +0200 |
---|---|---|
committer | Julius Haertl <jus@bitgrid.net> | 2016-11-18 10:23:23 +0100 |
commit | 9ac5476c4eb4d286ae1c48996e916180e3a54035 (patch) | |
tree | 7401e05bf747ffd69850ae7306d85a3633dc116e /lib/private/URLGenerator.php | |
parent | 4945592a86ad3bfc71d87b60621830c3ca1c21ee (diff) | |
download | nextcloud-server-9ac5476c4eb4d286ae1c48996e916180e3a54035.tar.gz nextcloud-server-9ac5476c4eb4d286ae1c48996e916180e3a54035.zip |
Add cachebuster to favicons
Signed-off-by: Julius Haertl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/URLGenerator.php')
-rw-r--r-- | lib/private/URLGenerator.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php index f8b79dedd8e..8290fcb1337 100644 --- a/lib/private/URLGenerator.php +++ b/lib/private/URLGenerator.php @@ -158,11 +158,13 @@ class URLGenerator implements IURLGenerator { // Check if the app is in the app folder $path = ''; if(\OCP\App::isEnabled('theming') && $image === "favicon.ico") { + $cacheBusterValue = $this->config->getAppValue('theming', 'cachebuster', '0'); if($app==="") { $app = "core"; } - $path = $this->linkToRoute('theming.Icon.getFavicon', [ 'app' => $app ]); + $path = $this->linkToRoute('theming.Icon.getFavicon', [ 'app' => $app ]) . '?v='. $cacheBusterValue; } elseif(\OCP\App::isEnabled('theming') && $image === "favicon-touch.png") { + $cacheBusterValue = $this->config->getAppValue('theming', 'cachebuster', '0'); if($app==="") { $app = "core"; } - $path = $this->linkToRoute('theming.Icon.getTouchIcon', [ 'app' => $app ]); + $path = $this->linkToRoute('theming.Icon.getTouchIcon', [ 'app' => $app ]) . '?v='. $cacheBusterValue; } elseif (file_exists(\OC::$SERVERROOT . "/themes/$theme/apps/$app/img/$image")) { $path = \OC::$WEBROOT . "/themes/$theme/apps/$app/img/$image"; } elseif (!file_exists(\OC::$SERVERROOT . "/themes/$theme/apps/$app/img/$basename.svg") |