summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShad Laws <shad@shadlaws.com>2013-07-06 03:15:11 -0700
committerShad Laws <shad@shadlaws.com>2013-07-06 03:15:11 -0700
commit7f8e2db6a801e5e02e0720e94ac74b5b101226e1 (patch)
tree5d6d4fd7c1d3a745adac025cadafbbe5fe2b0643
parent69baeb145d9554a697a2af2de30f16efeb6dfa00 (diff)
parent2d20af76f9a46575d77438b00e307739ab57e218 (diff)
Merge pull request #442 from DanielMuller/master
Add file extension to combined css/js links for better CDN caching
-rw-r--r--modules/gallery/libraries/Gallery_View.php4
1 files changed, 2 insertions, 2 deletions
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
+}