summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShad Laws <shad@shadlaws.com>2013-07-09 02:23:08 -0700
committerShad Laws <shad@shadlaws.com>2013-07-09 02:23:08 -0700
commitccceaa40c201c1785e5847ca2d58577041f24f24 (patch)
treed47654b180486c7ab56c74579fd5d7f6e4413015
parentb8899a3f79a191c44e651a81b5a1976fb9d46db9 (diff)
parente8752f60b8442b2daf6c8569c74e25057259922b (diff)
Merge pull request #450 from shadlaws/fixes_20130709_master
Remove extension from cache busters of non-combined JS/CSS links (follows 2078)
-rw-r--r--modules/gallery/libraries/Gallery_View.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php
index de282ac9..d98da83a 100644
--- a/modules/gallery/libraries/Gallery_View.php
+++ b/modules/gallery/libraries/Gallery_View.php
@@ -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);
}
}
}