From 709e5e1e84f5a1c2cc6c33e10b98eb00ea8aaf8e Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Mon, 26 Sep 2011 15:21:50 +0000 Subject: [PATCH] - bugfix repeated calls to same subtemplate did not make use of cached template object --- change_log.txt | 3 +++ libs/sysplugins/smarty_internal_template.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index a34a184f..e3487567 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== trunk ===== +26.09.2011 +- bugfix repeated calls to same subtemplate did not make use of cached template object + 24.09.2011 - removed internal muteExpectedErrors() calls in favor of having the implementor call this once from his application - optimized muteExpectedErrors() to pass errors to the latest registered error handler, if appliccable diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php index cb7717ac..33f0e58f 100644 --- a/libs/sysplugins/smarty_internal_template.php +++ b/libs/sysplugins/smarty_internal_template.php @@ -240,7 +240,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase { public function getSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope) { // already in template cache? - $_templateId = sha1($template . $cache_id . $compile_id); + $_templateId = sha1(join(DIRECTORY_SEPARATOR, $this->smarty->getTemplateDir()).$template . $cache_id . $compile_id); if (isset($this->smarty->template_objects[$_templateId])) { // clone cached template object because of possible recursive call $tpl = clone $this->smarty->template_objects[$_templateId];