Commit bfdc24a0 authored by Nigel McNie's avatar Nigel McNie
Browse files

Keep the compiled copies of templates in per-theme directories. This prevents...

Keep the  compiled copies of templates in per-theme directories. This prevents conflicts especially when switching themes.
parent a2ad7260
......@@ -28,7 +28,6 @@ defined('INTERNAL') || die();
function &smarty_core() {
require_once(get_config('libroot') . 'smarty/Smarty.class.php');
$smarty =& new Smarty();
......@@ -37,8 +36,10 @@ function &smarty_core() {
$smarty->template_dir = $theme->template_dir;
$smarty->compile_dir = get_config('dataroot').'smarty/compile';
$smarty->cache_dir = get_config('dataroot').'smarty/cache';
check_dir_exists(get_config('dataroot') . 'smarty/compile/' . $theme->theme);
check_dir_exists(get_config('dataroot') . 'smarty/cache/' . $theme->theme);
$smarty->compile_dir = get_config('dataroot').'smarty/compile/' . $theme->theme;
$smarty->cache_dir = get_config('dataroot').'smarty/cache/' . $theme->theme;
$smarty->assign('THEMEURL', get_config('themeurl'));
$smarty->assign('WWWROOT', get_config('wwwroot'));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment