diff options
Diffstat (limited to 'modules/gallery/libraries')
-rw-r--r-- | modules/gallery/libraries/Gallery_View.php | 9 |
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 +} |