From 79cbecb5e919695968fe62664a3c5fc1f5c1bbd5 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Tue, 26 Nov 2013 17:04:00 +0000 Subject: [PATCH] Fix the call center extension list. Reported as https://code.google.com/p/fusionpbx/issues/detail?id=510&start=100 --- resources/switch.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/resources/switch.php b/resources/switch.php index 515a2b2d35..0014725c29 100644 --- a/resources/switch.php +++ b/resources/switch.php @@ -698,7 +698,7 @@ function switch_select_destination($select_type, $select_label, $select_name, $s */ //list extensions - if ($select_type == "dialplan" || $select_type == "ivr") { + if ($select_type == "dialplan" || $select_type == "ivr" || $select_type == "call_center_contact") { $sql = "select * from v_extensions "; $sql .= "where domain_uuid = '$domain_uuid' "; $sql .= "and enabled = 'true' "; @@ -706,9 +706,7 @@ function switch_select_destination($select_type, $select_label, $select_name, $s $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); - if ($select_type == "dialplan" || $select_type == "ivr" || $select_type == "call_center_contact") { - echo "\n"; - } + echo "\n"; foreach ($result as &$row) { $extension = $row["extension"]; $context = $row["user_context"]; @@ -737,9 +735,7 @@ function switch_select_destination($select_type, $select_label, $select_name, $s } } } - if ($select_type == "dialplan" || $select_type == "ivr" || $select_type == "call_center_contact") { - echo "\n"; - } + echo "\n"; unset ($prep_statement, $extension); }