From b5db25c4368ff56b242e4380ad00e157115f88a7 Mon Sep 17 00:00:00 2001 From: "David M. Syzdek" Date: Mon, 3 Aug 2015 15:18:21 -0800 Subject: [PATCH] Adding ORDER BY so device groups are sorted by name instead of creation. Currently the function for retrieving device_groups returns rows in the order in which they were created. This causes the WebUI to display is a semi-random order. This patch causes the devices to be sorted by name which makes the group lists easier to navigate. --- includes/device-groups.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/device-groups.inc.php b/includes/device-groups.inc.php index 0f42109d43..3e5cee8705 100644 --- a/includes/device-groups.inc.php +++ b/includes/device-groups.inc.php @@ -92,7 +92,7 @@ function GetDevicesFromGroup($group_id) { * @return array */ function GetDeviceGroups() { - return dbFetchRows('SELECT * FROM device_groups'); + return dbFetchRows('SELECT * FROM device_groups ORDER BY name'); }//end GetDeviceGroups()