Commit 0342ab2e authored by Guillaume Heurtier's avatar Guillaume Heurtier

FIX #11641 TIME 1:30 fix order of folders in tree

parent 667582fc
......@@ -74,7 +74,8 @@ class FolderController
'countResources' => $count
];
if ($folder['level'] == 0) {
$tree[] = $insert;
// $tree[] = $insert;
array_splice($tree, 0, 0, [$insert]);
} else {
$found = false;
foreach ($tree as $key => $branch) {
......@@ -632,7 +633,7 @@ class FolderController
'select' => ['distinct (folders.id)', 'folders.*'],
'where' => $where,
'data' => $data,
'orderBy' => ['level', 'label']
'orderBy' => ['level', 'label desc']
]);
return $folders;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment