- bugfix subtemplate could use wrong varibale scope when it was recalled from different templates

This commit is contained in:
uwe.tews@googlemail.com
2011-07-27 16:47:44 +00:00
parent c4c0cd254c
commit 5693de91f5
2 changed files with 4 additions and 1 deletions

View File

@@ -1,4 +1,7 @@
===== SVN trunk =====
27/07/2011
- bugfix subtemplate could use wrong varibale scope when it was recalled from different templates
26/07/2011
- bugfix experimental getTags() method did not work

View File

@@ -143,7 +143,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase {
if ($_caching != 'null' && $_caching != Smarty::CACHING_OFF) {
$_output .= "\$sha = sha1($include_file . $_cache_id . $_compile_id);\n";
$_output .= "if (isset(\$_smarty_tpl->smarty->template_objects[\$sha])) {\n";
$_output .= "\$_template = \$_smarty_tpl->smarty->template_objects[\$sha]; \$_template->caching = $_caching; \$_template->cache_lifetime = $_cache_lifetime;\n";
$_output .= "\$_template = \$_smarty_tpl->smarty->template_objects[\$sha]; \$_template->parent = \$_smarty_tpl; \$_template->caching = $_caching; \$_template->cache_lifetime = $_cache_lifetime;\n";
$_output .= "} else {\n";
}
$_output .= "\$_template = new {$compiler->smarty->template_class}($include_file, \$_smarty_tpl->smarty, \$_smarty_tpl, $_cache_id, $_compile_id, $_caching, $_cache_lifetime);\n";