Set Smarty compile and cache folder to non document root

The smarty template_c and cache folder are now set on BASE folder and
not in the folder where the script is
This commit is contained in:
Clemens Schwaighofer
2018-04-03 17:41:02 +09:00
parent bf5486a59e
commit f51b74d8b5
7 changed files with 19 additions and 12 deletions

View File

@@ -93,4 +93,10 @@ $cms->CONTENT_DATA = array_merge($cms->HEADER, $cms->DATA, $cms->DEBUG_DATA);
while (list($key, $value) = each($cms->CONTENT_DATA)) {
$smarty->assign($key, $value);
}
if (is_dir(BASE.TEMPLATES_C)) {
$smarty->setCompileDir(BASE.TEMPLATES_C);
}
if (is_dir(BASE.CACHE)) {
$smarty->setCacheDir(BASE.CACHE);
}
$smarty->display($MASTER_TEMPLATE_NAME, $TEMPLATE.$lang, $TEMPLATE.$lang);