Skip to content

Commit

Permalink
Merge pull request #442 from DanielMuller/master
Browse files Browse the repository at this point in the history
Add file extension to combined css/js links for better CDN caching
  • Loading branch information
shadlaws committed Jul 6, 2013
2 parents 69baeb1 + 2d20af7 commit 7f8e2db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/gallery/libraries/Gallery_View.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function get_combined($type, $group=null) {
// 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.
Expand Down Expand Up @@ -262,4 +262,4 @@ private function process_css($css_file) {

return $css;
}
}
}

0 comments on commit 7f8e2db

Please sign in to comment.