From dda46447c30a3c8147fd7a80580a1c035f720665 Mon Sep 17 00:00:00 2001 From: Nick Peelman Date: Mon, 27 Sep 2021 04:34:55 -0400 Subject: [PATCH] Add ORDER BY to the ports query when showing the ports list on device overview (#13276) --- includes/html/pages/device/overview/ports.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/html/pages/device/overview/ports.inc.php b/includes/html/pages/device/overview/ports.inc.php index 886ba05c91..6a58682ba3 100644 --- a/includes/html/pages/device/overview/ports.inc.php +++ b/includes/html/pages/device/overview/ports.inc.php @@ -50,7 +50,7 @@ if (ObjectCache::portCounts(['total'], $device['device_id'])['total'] > 0) { $ifsep = ''; - foreach (dbFetchRows("SELECT * FROM `ports` WHERE device_id = ? AND `deleted` != '1' AND `disabled` = 0", [$device['device_id']]) as $data) { + foreach (dbFetchRows("SELECT * FROM `ports` WHERE device_id = ? AND `deleted` != '1' AND `disabled` = 0 ORDER BY ifName", [$device['device_id']]) as $data) { $data = cleanPort($data); $data = array_merge($data, $device); echo "$ifsep" . generate_port_link($data, makeshortif(strtolower($data['label'])));