Skip to content

Commit

Permalink
Merge branch 'MDL-40086-24' of git://github.com/FMCorz/moodle into MO…
Browse files Browse the repository at this point in the history
…ODLE_24_STABLE
  • Loading branch information
Sam Hemelryk committed Aug 6, 2013
2 parents b19a900 + 2980ec2 commit b6a2a20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/filestorage/file_storage.php
Expand Up @@ -493,8 +493,10 @@ public function get_area_tree($contextid, $component, $filearea, $itemid) {
protected function sort_area_tree($tree) { protected function sort_area_tree($tree) {
foreach ($tree as $key => &$value) { foreach ($tree as $key => &$value) {
if ($key == 'subdirs') { if ($key == 'subdirs') {
$value = $this->sort_area_tree($value);
collatorlib::ksort($value, collatorlib::SORT_NATURAL); collatorlib::ksort($value, collatorlib::SORT_NATURAL);
foreach ($value as $subdirname => &$subtree) {
$subtree = $this->sort_area_tree($subtree);
}
} else if ($key == 'files') { } else if ($key == 'files') {
collatorlib::ksort($value, collatorlib::SORT_NATURAL); collatorlib::ksort($value, collatorlib::SORT_NATURAL);
} }
Expand Down

0 comments on commit b6a2a20

Please sign in to comment.