summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2016-08-18 15:45:22 +0200
committerGitHub <noreply@github.com>2016-08-18 15:45:22 +0200
commit3b6bbf81591c6b35981d78895d656d9499d1ecd3 (patch)
tree95ee94ffdf596d9502d878b1c6ffabd109b174f1
parent71d81eef08c65f25cb552647aeee7884075a0fcd (diff)
parent5581a602cc3eceeb2efd647a3772be0537e58f66 (diff)
downloadnextcloud-server-3b6bbf81591c6b35981d78895d656d9499d1ecd3.tar.gz
nextcloud-server-3b6bbf81591c6b35981d78895d656d9499d1ecd3.zip
Merge pull request #934 from nextcloud/add-cachebusters
Add cachebusters
-rw-r--r--apps/files/css/files.css14
-rw-r--r--core/css/apps.css6
-rw-r--r--core/css/header.css4
-rw-r--r--core/css/styles.css16
-rw-r--r--core/templates/layout.user.php8
-rw-r--r--lib/private/TemplateLayout.php1
-rw-r--r--settings/js/apps.js4
7 files changed, 27 insertions, 26 deletions
diff --git a/apps/files/css/files.css b/apps/files/css/files.css
index 004a0b9ff50..b1759abfb1d 100644
--- a/apps/files/css/files.css
+++ b/apps/files/css/files.css
@@ -87,26 +87,26 @@
/* icons for sidebar */
.nav-icon-files {
- background-image: url('../img/folder.svg');
+ background-image: url('../img/folder.svg?v=1');
}
.nav-icon-recent {
- background-image: url('../img/recent.svg');
+ background-image: url('../img/recent.svg?v=1');
}
.nav-icon-favorites {
- background-image: url('../img/star.svg');
+ background-image: url('../img/star.svg?v=1');
}
.nav-icon-sharingin,
.nav-icon-sharingout {
- background-image: url('../img/share.svg');
+ background-image: url('../img/share.svg?v=1');
}
.nav-icon-sharinglinks {
- background-image: url('../img/public.svg');
+ background-image: url('../img/public.svg?v=1');
}
.nav-icon-extstoragemounts {
- background-image: url('../img/external.svg');
+ background-image: url('../img/external.svg?v=1');
}
.nav-icon-trashbin {
- background-image: url('../img/delete.svg');
+ background-image: url('../img/delete.svg?v=1');
}
#app-navigation .nav-files a.nav-icon-files {
diff --git a/core/css/apps.css b/core/css/apps.css
index 0ccdb8a0398..24865cd6f6d 100644
--- a/core/css/apps.css
+++ b/core/css/apps.css
@@ -92,7 +92,7 @@
width: 44px;
margin: 0;
padding: 0;
- background: none; background-image: url('../img/actions/triangle-s.svg');
+ background: none; background-image: url('../img/actions/triangle-s.svg?v=1');
background-size: 16px; background-repeat: no-repeat; background-position: center;
border: none;
border-radius: 0;
@@ -256,7 +256,7 @@
background-color: transparent;
background-repeat: no-repeat;
background-position: center;
- background-image: url('../img/actions/more.svg');
+ background-image: url('../img/actions/more.svg?v=1');
}
#app-navigation .app-navigation-entry-utils-menu-button:hover button,
@@ -497,7 +497,7 @@
padding: 0;
margin: 0;
background-color: #fff;
- background-image: url('../img/actions/settings.svg');
+ background-image: url('../img/actions/settings.svg?v=1');
background-position: 14px center;
background-repeat: no-repeat;
box-shadow: none;
diff --git a/core/css/header.css b/core/css/header.css
index 5a2b8009b15..efdd3be7ceb 100644
--- a/core/css/header.css
+++ b/core/css/header.css
@@ -68,7 +68,7 @@
}
#header .logo {
- background-image: url('../img/logo-icon.svg');
+ background-image: url('../img/logo-icon.svg?v=1');
background-repeat: no-repeat;
background-size: 175px;
background-position: center;
@@ -80,7 +80,7 @@
#header .logo-icon {
/* display logo so appname can be shown next to it */
display: inline-block;
- background-image: url('../img/logo-icon.svg');
+ background-image: url('../img/logo-icon.svg?v=1');
background-repeat: no-repeat;
background-position: center center;
width: 62px;
diff --git a/core/css/styles.css b/core/css/styles.css
index 7f4f7896c94..428688060b7 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -26,7 +26,7 @@ body {
#body-login {
text-align: center;
background-color: #0082c9;
- background-image: url('../img/background.jpg');
+ background-image: url('../img/background.jpg?v=1');
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: cover;
@@ -98,7 +98,7 @@ a.two-factor-cancel {
font-size: 1.2em;
padding: 3px;
padding-left: 25px;
- background: transparent url('../img/actions/search-white.svg') no-repeat 6px center;
+ background: transparent url('../img/actions/search-white.svg?v=1') no-repeat 6px center;
color: #fff;
border: 0;
border-radius: 3px;
@@ -465,7 +465,7 @@ label.infield {
position: absolute !important;
height: 20px;
width: 24px;
- background-image: url('../img/actions/toggle.svg');
+ background-image: url('../img/actions/toggle.svg?v=1');
background-repeat: no-repeat;
background-position: center;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
@@ -757,15 +757,15 @@ a.bookmarklet { background-color:#ddd; border:1px solid #ccc; padding:5px;paddin
.exception{color:#000;}
.exception textarea{width:95%;height:200px;background:#ffe;border:0;}
-.ui-icon-circle-triangle-e{ background-image:url('../img/actions/play-next.svg'); }
-.ui-icon-circle-triangle-w{ background-image:url('../img/actions/play-previous.svg'); }
+.ui-icon-circle-triangle-e{ background-image:url('../img/actions/play-next.svg?v=1'); }
+.ui-icon-circle-triangle-w{ background-image:url('../img/actions/play-previous.svg?v=1'); }
.ui-datepicker-prev,.ui-datepicker-next{ border:1px solid #ddd; background:#fff; }
/* ---- DIALOGS ---- */
#oc-dialog-filepicker-content .dirtree {width:92%; overflow:hidden; }
#oc-dialog-filepicker-content .dirtree .home {
- background-image:url('../img/places/home.svg');
+ background-image:url('../img/places/home.svg?v=1');
background-repeat:no-repeat;
background-position: left center;
width: 30px;
@@ -848,7 +848,7 @@ span.ui-icon {float: left; margin: 3px 7px 30px 0;}
}
.popup.topright { top:7em; right:1em; }
.popup.bottomleft { bottom:1em; left:33em; }
-.popup .close { position:absolute; top:0.2em; right:0.2em; height:20px; width:20px; background:url('../img/actions/close.svg') no-repeat center; }
+.popup .close { position:absolute; top:0.2em; right:0.2em; height:20px; width:20px; background:url('../img/actions/close.svg?v=1') no-repeat center; }
.popup h2 { font-size:20px; }
.arrow { border-bottom:10px solid white; border-left:10px solid transparent; border-right:10px solid transparent; display:block; height:0; position:absolute; width:0; z-index:201; }
.arrow.left { left:-13px; bottom:1.2em; -webkit-transform:rotate(270deg); -ms-transform:rotate(270deg); transform:rotate(270deg); }
@@ -860,7 +860,7 @@ span.ui-icon {float: left; margin: 3px 7px 30px 0;}
div.crumb {
float: left;
display: block;
- background-image: url('../img/breadcrumb.svg');
+ background-image: url('../img/breadcrumb.svg?v=1');
background-repeat: no-repeat;
background-position: right center;
height: 44px;
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 2c0d3f05297..17f895bc17d 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -81,14 +81,14 @@
<li>
<a href="<?php print_unescaped($entry['href']); ?>"
<?php if( $entry["active"] ): ?> class="active"<?php endif; ?>>
- <img alt="" src="<?php print_unescaped($entry['icon']); ?>">
+ <img alt="" src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>">
<?php p($entry['name']) ?>
</a>
</li>
<?php endforeach; ?>
<li>
<a id="logout" <?php print_unescaped(OC_User::getLogoutAttribute()); ?>>
- <img alt="" src="<?php print_unescaped(image_path('', 'actions/logout.svg')); ?>">
+ <img alt="" src="<?php print_unescaped(image_path('', 'actions/logout.svg') . '?v=' . $_['versionHash']); ?>">
<?php p($l->t('Log out'));?>
</a>
</li>
@@ -115,7 +115,7 @@
<?php if( $entry['active'] ): ?> class="active"<?php endif; ?>>
<svg width="32" height="32" viewBox="0 0 32 32">
<defs><filter id="invert"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs>
- <image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert)" xlink:href="<?php print_unescaped($entry['icon']); ?>" class="app-icon"></image>
+ <image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert)" xlink:href="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" class="app-icon"></image>
</svg>
<div class="icon-loading-dark" style="display:none;"></div>
<span>
@@ -133,7 +133,7 @@
<?php if( $_['appsmanagement_active'] ): ?> class="active"<?php endif; ?>>
<svg width="32" height="32" viewBox="0 0 32 32" class="app-icon">
<defs><filter id="invert"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs>
- <image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert)" xlink:href="<?php print_unescaped(image_path('settings', 'apps.svg')); ?>"></image>
+ <image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert)" xlink:href="<?php print_unescaped(image_path('settings', 'apps.svg') . '?v=' . $_['versionHash']); ?>"></image>
</svg>
<div class="icon-loading-dark" style="display:none;"></div>
<span>
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index 9e3bbf88470..7e5c120717f 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -153,6 +153,7 @@ class TemplateLayout extends \OC_Template {
$cssFiles = self::findStylesheetFiles(\OC_Util::$styles);
$this->assign('cssfiles', array());
$this->assign('printcssfiles', []);
+ $this->assign('versionHash', self::$versionHash);
foreach($cssFiles as $info) {
$web = $info[1];
$file = $info[2];
diff --git a/settings/js/apps.js b/settings/js/apps.js
index ac259dd7989..985b117feff 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -236,10 +236,10 @@ OC.Settings.Apps = OC.Settings.Apps || {
var img = '<svg width="72" height="72" viewBox="0 0 72 72">';
if (appfromstore) {
- img += '<image x="0" y="0" width="72" height="72" preserveAspectRatio="xMinYMin meet" xlink:href="' + url + '" class="app-icon" /></svg>';
+ img += '<image x="0" y="0" width="72" height="72" preserveAspectRatio="xMinYMin meet" xlink:href="' + url + '?v=' + oc_config.version + '" class="app-icon" /></svg>';
} else {
img += '<defs><filter id="invertIcon"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs>';
- img += '<image x="0" y="0" width="72" height="72" preserveAspectRatio="xMinYMin meet" filter="url(#invertIcon)" xlink:href="' + url + '" class="app-icon"></image></svg>';
+ img += '<image x="0" y="0" width="72" height="72" preserveAspectRatio="xMinYMin meet" filter="url(#invertIcon)" xlink:href="' + url + '?v=' + oc_config.version + '" class="app-icon"></image></svg>';
}
return img;
},