From d1b7fb5cca25bd2a2e3d49d41dd9cfafbca5f948 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Tue, 26 Nov 2013 20:09:56 +0000 Subject: [PATCH] Provisioning fix some spelling errors, a few other minor modifications. --- app/provision/index.php | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/app/provision/index.php b/app/provision/index.php index ad636f5fb1..77e186f098 100644 --- a/app/provision/index.php +++ b/app/provision/index.php @@ -423,34 +423,23 @@ include "resources/classes/template.php"; } //replace the variables in the template in the future loop through all the line numbers to do a replace for each possible line number - $view->assign( "mac" , $mac); - $view->assign( "label", $device_label); - $view->assign( "firmware_version", $device_firmware_version); - $view->assign( "domain_time_zone", $device_time_zone); - $view->assign( "domain_name", $_SESSION['domain_name']); - $view->assign( "project_path", PROJECT_PATH); - $view->assign( "server1_address", $server1_address); - $view->assign( "proxy1_address", $proxy1_address); - $view->assign( "password",$password); - - //cleanup any remaining variables ( no longer required as raintpl blanks non assigned variables ) - // for ($i = 1; $i <= 100; $i++) { - // $file_contents = str_replace("{v_line".$i."_server_address}", "", $file_contents); - // $file_contents = str_replace("{v_line".$i."_outbound_proxy}", "", $file_contents); - // $file_contents = str_replace("{v_line".$i."_displayname}", "", $file_contents); - // $file_contents = str_replace("{v_line".$i."_shortname}", "", $file_contents); - // $file_contents = str_replace("{v_line".$i."_user_id}", "", $file_contents); - // $file_contents = str_replace("{v_line".$i."_auth_id}", "", $file_contents); - // $file_contents = str_replace("{v_line".$i."_user_password}", "", $file_contents); - // } + $view->assign("mac" , $mac); + $view->assign("label", $device_label); + $view->assign("firmware_version", $device_firmware_version); + $view->assign("domain_time_zone", $device_time_zone); + $view->assign("domain_name", $_SESSION['domain_name']); + $view->assign("project_path", PROJECT_PATH); + $view->assign("server1_address", $server1_address); + $view->assign("proxy1_address", $proxy1_address); + $view->assign("password",$password); //replace the dynamic provision variables that are defined in 'default settings' and 'domain settings' - //example: category=provision, subcategory=sip_transport, name=var, value=tls - used in the template as {v_sip_transport} + //example: category=provision, subcategory=sip_transport, name=var, value=tls - used in the template as {$sip_transport} foreach($_SESSION['provision'] as $key=>$value) { $view->assign($key, $value['var']); } -//output template to string for headder processing +//output template to string for header processing $file_contents = $view->render($file); //deliver the customized config over HTTP/HTTPS