Permalink
Browse files

MDL-38000 css: fixed handling of CSS files by outputlib.

  • Loading branch information...
1 parent 09de5eb commit 2ad68b8c955654b2a1fa7c9dc8d34d71c2cb02ba Sam Hemelryk committed Feb 13, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/outputlib.php
View
@@ -823,10 +823,12 @@ public function css_content(css_optimiser $optimiser = null) {
protected function css_files_get_contents($file, array $keys, css_optimiser $optimiser = null) {
global $CFG;
if (is_array($file)) {
+ // We use a separate array to keep everything in the exact same order.
+ $return = array();
foreach ($file as $key=>$f) {
- $file[$key] = $this->css_files_get_contents($f, array_merge($keys, array($key)), $optimiser);
+ $return[clean_param($key, PARAM_SAFEDIR)] = $this->css_files_get_contents($f, array_merge($keys, array($key)), $optimiser);
}
- return $file;
+ return $return;
} else {
$contents = file_get_contents($file);
$contents = $this->post_process($contents);
@@ -914,7 +916,6 @@ public function javascript_files($type) {
}
}
}
-
return $js;
}

0 comments on commit 2ad68b8

Please sign in to comment.