mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Ability to use ASC/DESC direction in getTreeModelSorted()
This commit is contained in:
@@ -3092,6 +3092,13 @@ class e_admin_controller_ui extends e_admin_controller
|
|||||||
return ($weightA < $weightB) ? -1 : 1;
|
return ($weightA < $weightB) ? -1 : 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$direction = 'ASC';
|
||||||
|
|
||||||
|
if($direction == 'DESC')
|
||||||
|
{
|
||||||
|
$models = array_reverse($models, true);
|
||||||
|
}
|
||||||
|
|
||||||
// Now, we sort models by hierarchy.
|
// Now, we sort models by hierarchy.
|
||||||
foreach($levels as $level)
|
foreach($levels as $level)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user