From cc85d17a13e507edbc0042e3aa5b03f5394dac44 Mon Sep 17 00:00:00 2001 From: TylerP Date: Thu, 26 Oct 2017 00:49:42 -0400 Subject: [PATCH] Sort by CIDName if populated, otherwise CIDNumber (#2890) I believe this will help users to sort through the caller ID numbers on the dashboard. --- app/extensions/extension_dashboard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/extensions/extension_dashboard.php b/app/extensions/extension_dashboard.php index 910678ff90..aabc92e179 100644 --- a/app/extensions/extension_dashboard.php +++ b/app/extensions/extension_dashboard.php @@ -134,7 +134,7 @@ $sql = "select destination_caller_id_name, destination_caller_id_number from v_destinations "; $sql .= "where domain_uuid = '".check_str($_SESSION['domain_uuid'])."' "; $sql .= "and destination_type = 'inbound' "; - $sql .= "order by destination_number asc "; + $sql .= "order by destination_caller_id_name asc, destination_caller_id_number asc"; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $destinations = $prep_statement->fetchAll(PDO::FETCH_ASSOC);