diff --git a/includes/html/list/devices.inc.php b/includes/html/list/devices.inc.php index 8b1d3b9dc6..46d8306b1a 100644 --- a/includes/html/list/devices.inc.php +++ b/includes/html/list/devices.inc.php @@ -68,4 +68,6 @@ $devices = array_map(function ($device) { $more = ($offset + count($devices)) < $total; +array_multisort(array_column($devices, 'text'), SORT_ASC, $devices); + return [$devices, $more]; diff --git a/includes/html/list/groups.inc.php b/includes/html/list/groups.inc.php index b1bd7f9990..a511c8c835 100644 --- a/includes/html/list/groups.inc.php +++ b/includes/html/list/groups.inc.php @@ -50,7 +50,7 @@ if (!empty($_REQUEST['limit'])) { } -$sql = "SELECT `id`, `name` AS `text` FROM `device_groups` $query"; +$sql = "SELECT `id`, `name` AS `text` FROM `device_groups` $query order by `name`"; $groups = dbFetchRows($sql, $params); $more = ($offset + count($groups)) < $total;