Skip to content

Commit

Permalink
Remove extension from cache busters of non-combined JS/CSS links (fol…
Browse files Browse the repository at this point in the history
…lows 2078).
  • Loading branch information
shadlaws committed Jul 9, 2013
1 parent b8899a3 commit e8752f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/gallery/libraries/Gallery_View.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,12 @@ public function get_combined($type, $group=null) {
}
} 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);
}
}
}
Expand Down

0 comments on commit e8752f6

Please sign in to comment.