Skip to content

Commit

Permalink
MDL-34607 File API: Removed ordering by sortorder in area tree
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Massart committed Sep 21, 2012
1 parent c366bea commit 7be6c09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/filestorage/file_storage.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ public function get_area_files($contextid, $component, $filearea, $itemid = fals
*/ */
public function get_area_tree($contextid, $component, $filearea, $itemid) { public function get_area_tree($contextid, $component, $filearea, $itemid) {
$result = array('dirname'=>'', 'dirfile'=>null, 'subdirs'=>array(), 'files'=>array()); $result = array('dirname'=>'', 'dirfile'=>null, 'subdirs'=>array(), 'files'=>array());
$files = $this->get_area_files($contextid, $component, $filearea, $itemid, "sortorder, itemid, filepath, filename", true); $files = $this->get_area_files($contextid, $component, $filearea, $itemid, "itemid, filepath, filename", true);
// first create directory structure // first create directory structure
foreach ($files as $hash=>$dir) { foreach ($files as $hash=>$dir) {
if (!$dir->is_directory()) { if (!$dir->is_directory()) {
Expand Down

0 comments on commit 7be6c09

Please sign in to comment.