1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

Ability to use ASC/DESC direction in getTreeModelSorted()

This commit is contained in:
Lóna Lore 2017-12-22 00:51:44 +01:00
parent 1b39eae368
commit 4ef9e78935

View File

@ -3092,6 +3092,13 @@ class e_admin_controller_ui extends e_admin_controller
return ($weightA < $weightB) ? -1 : 1;
});
$direction = 'ASC';
if($direction == 'DESC')
{
$models = array_reverse($models, true);
}
// Now, we sort models by hierarchy.
foreach($levels as $level)
{