summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries
diff options
context:
space:
mode:
authorNathan Kinkade <nath@nkinka.de>2013-07-17 23:07:31 +0000
committerNathan Kinkade <nath@nkinka.de>2013-07-17 23:07:31 +0000
commit25c5218b5ee7361943979b386cc681cf158f707e (patch)
tree42da65dfeb85944f049a32c61824361828efafdf /modules/gallery/libraries
parent9ef4eff6aea4ec1135f7b12ff8f22dc296cc91ba (diff)
parentffecd3feffdb0d49e14c75d90e2765dcb3bddc02 (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/libraries')
-rw-r--r--modules/gallery/libraries/Gallery_View.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php
index 3f59db6a..d98da83a 100644
--- a/modules/gallery/libraries/Gallery_View.php
+++ b/modules/gallery/libraries/Gallery_View.php
@@ -157,7 +157,7 @@ class Gallery_View_Core extends View {
// 7 == size, 9 == mtime, see http://php.net/stat
$key[] = "$path $stats[7] $stats[9]";
}
- $key = md5(join(" ", $key));
+ $key = md5(join(" ", $key)) . (($type=="css") ? ".css" : ".js");
if (gallery::allow_css_and_js_combining()) {
// Combine enabled - if we're at the start of the buffer, add a comment.
@@ -206,11 +206,12 @@ class Gallery_View_Core extends View {
}
} else {
// Don't combine - just return the CSS and JS links (with the key as a cache buster).
+ $key_base = substr($key, 0, (($type == "css") ? -4 : -3)); // key without extension
foreach (array_keys($this->combine_queue[$type][$group]) as $path) {
if ($type == "css") {
- $buf .= html::stylesheet("$path?m=$key", "screen,print,projection", false);
+ $buf .= html::stylesheet("$path?m=$key_base", "screen,print,projection", false);
} else {
- $buf .= html::script("$path?m=$key", false);
+ $buf .= html::script("$path?m=$key_base", false);
}
}
}
@@ -262,4 +263,4 @@ class Gallery_View_Core extends View {
return $css;
}
-} \ No newline at end of file
+}