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:
parent
1b39eae368
commit
4ef9e78935
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user