From 2d20af76f9a46575d77438b00e307739ab57e218 Mon Sep 17 00:00:00 2001 From: Daniel Muller Date: Sat, 6 Jul 2013 13:08:51 +0800 Subject: #2078 Missing file type extension on combined css/js --- modules/gallery/libraries/Gallery_View.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/gallery/libraries/Gallery_View.php') diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php index 3f59db6a..de282ac9 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. @@ -262,4 +262,4 @@ class Gallery_View_Core extends View { return $css; } -} \ No newline at end of file +} -- cgit v1.2.3 From e8752f60b8442b2daf6c8569c74e25057259922b Mon Sep 17 00:00:00 2001 From: shadlaws Date: Tue, 9 Jul 2013 11:19:20 +0200 Subject: Remove extension from cache busters of non-combined JS/CSS links (follows 2078). --- modules/gallery/libraries/Gallery_View.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/gallery/libraries/Gallery_View.php') 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); } } } -- cgit v1.2.3