Merge branch 'MDL-40086-master' of git://github.com/FMCorz/moodle
authorSam Hemelryk <sam@moodle.com>
Tue, 6 Aug 2013 22:39:40 +0000 (10:39 +1200)
committerSam Hemelryk <sam@moodle.com>
Tue, 6 Aug 2013 22:39:40 +0000 (10:39 +1200)
Conflicts:
lib/filestorage/file_storage.php

1  2 
lib/filestorage/file_storage.php

@@@ -647,10 -647,12 +647,12 @@@ class file_storage 
      protected function sort_area_tree($tree) {
          foreach ($tree as $key => &$value) {
              if ($key == 'subdirs') {
-                 $value = $this->sort_area_tree($value);
 -                collatorlib::ksort($value, collatorlib::SORT_NATURAL);
 +                core_collator::ksort($value, core_collator::SORT_NATURAL);
+                 foreach ($value as $subdirname => &$subtree) {
+                     $subtree = $this->sort_area_tree($subtree);
+                 }
              } else if ($key == 'files') {
 -                collatorlib::ksort($value, collatorlib::SORT_NATURAL);
 +                core_collator::ksort($value, core_collator::SORT_NATURAL);
              }
          }
          return $tree;