Fix provisioning templates ignoring domain specific templates (#2960)
* Moved multi-tenant template directory statement to before the templating engine initialisation.
* Revert "Moved multi-tenant template directory statement to before the templating engine initialisation." Formatting issue, needless diffs.
This reverts commit 04547a1337.
* Moved multi-tenant template directory statement to before the template
This commit is contained in:
parent
7a6bfcec41
commit
fcd29eafe5
|
|
@ -812,6 +812,15 @@ include "root.php";
|
||||||
}
|
}
|
||||||
unset ($prep_statement);
|
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
|
//initialize a template object
|
||||||
$view = new template();
|
$view = new template();
|
||||||
|
|
@ -1238,16 +1247,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 $file is not provided then look for a default file that exists
|
||||||
if (strlen($file) == 0) {
|
if (strlen($file) == 0) {
|
||||||
if (file_exists($template_dir."/".$device_template ."/{\$mac}")) {
|
if (file_exists($template_dir."/".$device_template ."/{\$mac}")) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue