From 6b47cfff03e066ab6e6c6d4641a5ad8b8cacc66d Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Tue, 12 Nov 2013 04:53:15 +0000 Subject: [PATCH] Set the default provisiong engine. --- app/provision/index.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/provision/index.php b/app/provision/index.php index 3f082e76bf..ad636f5fb1 100644 --- a/app/provision/index.php +++ b/app/provision/index.php @@ -332,13 +332,19 @@ include "resources/classes/template.php"; //$proxy1_address= "10.2.0.2"; //$proxy2_address= ""; //$proxy3_address= ""; - + //initialize a template object $view = new template(); - $view->engine = "twig"; + if (strlen($_SESSION['provision']['template_engine']['text']) > 0) { + $view->engine = $_SESSION['provision']['template_engine']['text']; //raintpl, smarty, twig + } + else { + $view->engine = "smarty"; + } $view->template_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/".$device_template."/"; $view->cache_dir = $_SESSION['server']['temp']['dir']; $view->init(); + //replace the variables in the template in the future loop through all the line numbers to do a replace for each possible line number //get the time zone