From aed89a500068318bd429cc229e94eac65d901d90 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 21 Apr 2017 06:55:44 -0600 Subject: [PATCH] Update extension_dashboard.php Make the outbound caller id select work better. --- app/extensions/extension_dashboard.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/extensions/extension_dashboard.php b/app/extensions/extension_dashboard.php index 67b761d79c..73a694e00f 100644 --- a/app/extensions/extension_dashboard.php +++ b/app/extensions/extension_dashboard.php @@ -126,8 +126,8 @@ $extensions = $_SESSION['user']['extension']; //get the destinations - $sql = "select * from v_destinations "; - $sql .= "where domain_uuid = '".check_str($domain_uuid)."' "; + $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 "; $prep_statement = $db->prepare(check_sql($sql)); @@ -197,12 +197,12 @@ echo " \n"; echo " \n"; foreach ($destinations as &$row) { - if(strlen($tmp) > 0){ - if ($outbound_caller_id_number == $row['outbound_caller_id_number']) { - echo " \n"; + if(strlen($row['destination_caller_id_number']) > 0){ + if ($outbound_caller_id_number == $row['destination_caller_id_number']) { + echo " \n"; } else { - echo " \n"; + echo " \n"; } } }