Moved multi-tenant template directory statement to before the templating engine initialisation.
This commit is contained in:
parent
9c7a64cc61
commit
04547a1337
|
|
@ -813,6 +813,16 @@ include "root.php";
|
|||
unset ($prep_statement);
|
||||
}
|
||||
|
||||
//set the template directory
|
||||
if (strlen($provision["template_dir"]) > 0) {
|
||||
$template_dir = $provision["template_dir"];
|
||||
}
|
||||
|
||||
//if the domain name directory exists then only use templates from it
|
||||
if (is_dir($template_dir.'/'.$domain_name)) {
|
||||
$device_template = $domain_name.'/'.$device_template;
|
||||
}
|
||||
|
||||
//initialize a template object
|
||||
$view = new template();
|
||||
if (strlen($_SESSION['provision']['template_engine']['text']) > 0) {
|
||||
|
|
@ -1238,16 +1248,6 @@ include "root.php";
|
|||
}
|
||||
}
|
||||
|
||||
//set the template directory
|
||||
if (strlen($provision["template_dir"]) > 0) {
|
||||
$template_dir = $provision["template_dir"];
|
||||
}
|
||||
|
||||
//if the domain name directory exists then only use templates from it
|
||||
if (is_dir($template_dir.'/'.$domain_name)) {
|
||||
$device_template = $domain_name.'/'.$device_template;
|
||||
}
|
||||
|
||||
//if $file is not provided then look for a default file that exists
|
||||
if (strlen($file) == 0) {
|
||||
if (file_exists($template_dir."/".$device_template ."/{\$mac}")) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue