diff --git a/change_log.txt b/change_log.txt index a53802b3..37ecfc37 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,3 +1,6 @@ +10/11/2010 +- observe compile_id also for config files + 09/11/2010 -bugfix on complex expressions as start value for {for} tag diff --git a/libs/sysplugins/smarty_internal_config.php b/libs/sysplugins/smarty_internal_config.php index 5097398c..0468f090 100644 --- a/libs/sysplugins/smarty_internal_config.php +++ b/libs/sysplugins/smarty_internal_config.php @@ -135,6 +135,7 @@ class Smarty_Internal_Config { } public function buildCompiledFilepath() { + $_compile_id = isset($_template->smarty->compile_id) ? preg_replace('![^\w\|]+!', '_', $_template->smarty->compile_id) : null; $_flag = (int)$this->smarty->config_read_hidden + (int)$this->smarty->config_booleanize * 2 + (int)$this->smarty->config_overwrite * 4; $_filepath = sha1($this->config_resource_name . $_flag); @@ -145,6 +146,10 @@ class Smarty_Internal_Config { . substr($_filepath, 4, 2) . DS . $_filepath; } + $_compile_dir_sep = $_template->smarty->use_sub_dirs ? DS : '^'; + if (isset($_compile_id)) { + $_filepath = $_compile_id . $_compile_dir_sep . $_filepath; + } $_compile_dir = $this->smarty->compile_dir; if (substr($_compile_dir, -1) != DS) { $_compile_dir .= DS;