Permalink
Browse files

Merge branch 'MDL-40086-24' of git://github.com/FMCorz/moodle into MO…

…ODLE_24_STABLE
  • Loading branch information...
2 parents b19a900 + 2980ec2 commit b6a2a20236c3da0705b5abb284a63a05fc274856 Sam Hemelryk committed Aug 6, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/filestorage/file_storage.php
View
4 lib/filestorage/file_storage.php
@@ -493,8 +493,10 @@ public function get_area_tree($contextid, $component, $filearea, $itemid) {
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);
+ foreach ($value as $subdirname => &$subtree) {
+ $subtree = $this->sort_area_tree($subtree);
+ }
} else if ($key == 'files') {
collatorlib::ksort($value, collatorlib::SORT_NATURAL);
}

0 comments on commit b6a2a20

Please sign in to comment.