From e8ba73b5f52e905eb22a5d03cd07758e6945bf3b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 12 Sep 2018 13:59:27 -0600 Subject: [PATCH] Update provision.php --- app/provision/resources/classes/provision.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/provision/resources/classes/provision.php b/app/provision/resources/classes/provision.php index 2bd36bb5d2..b9f9bdc709 100644 --- a/app/provision/resources/classes/provision.php +++ b/app/provision/resources/classes/provision.php @@ -856,8 +856,7 @@ include "root.php"; $prep_statement = $this->db->prepare(check_sql($sql)); $prep_statement->execute(); $device_lines = $prep_statement->fetchAll(PDO::FETCH_NAMED); - //assign the keys array - $view->assign("lines", $device_lines); + //set the variables if (is_array($device_lines)) { foreach($device_lines as $row) { @@ -880,11 +879,14 @@ include "root.php"; } //set a lines array index is the line number + $lines[$line_number] = $row; $lines[$line_number]['register_expires'] = $register_expires; $lines[$line_number]['sip_transport'] = strtolower($sip_transport); $lines[$line_number]['sip_port'] = $sip_port; $lines[$line_number]['server_address'] = $row["server_address"]; $lines[$line_number]['outbound_proxy'] = $row["outbound_proxy_primary"]; + $lines[$line_number]['server'][1]['address'] = $row["server_address_primary"]; + $lines[$line_number]['server'][2]['address'] = $row["server_address_secondary"]; $lines[$line_number]['outbound_proxy_primary'] = $row["outbound_proxy_primary"]; $lines[$line_number]['outbound_proxy_secondary'] = $row["outbound_proxy_secondary"]; $lines[$line_number]['display_name'] = $row["display_name"]; @@ -927,6 +929,10 @@ include "root.php"; unset ($prep_statement); } + //assign the lines and accounts array + $view->assign("lines", $lines); + $view->assign("account", $lines); + //get the list of contact directly assigned to the user if (strlen($device_user_uuid) > 0 and strlen($domain_uuid) > 0) { //get the contacts assigned to the groups and add to the contacts array