Merge branch 'wip-MDL-38000-m25' of git://github.com/samhemelryk/moodle
authorDamyon Wiese <damyon@moodle.com>
Tue, 19 Feb 2013 05:48:12 +0000 (13:48 +0800)
committerDamyon Wiese <damyon@moodle.com>
Tue, 19 Feb 2013 05:48:12 +0000 (13:48 +0800)
lib/outputlib.php

index 53e9907..416b944 100644 (file)
@@ -823,10 +823,12 @@ class theme_config {
     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);
@@ -922,7 +924,6 @@ class theme_config {
                 }
             }
         }
-
         return $js;
     }