- bugfix the compiler did fail when using template inheritance and recursive {include} (smarty-developers group)

This commit is contained in:
Uwe.Tews@googlemail.com
2014-01-18 14:43:02 +00:00
parent 1dfbe19ebf
commit 290dd3f73f
2 changed files with 5 additions and 2 deletions

View File

@@ -1,4 +1,7 @@
===== trunk =====
18.01.2014
- bugfix the compiler did fail when using template inheritance and recursive {include} (smarty-developers group)
11.01.2014
- bugfix "* }" (spaces before right delimiter) was interpreted by mistake as comment end tag (Issue 170)
- internals content cache should be clear when updating cache file

View File

@@ -166,7 +166,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
$nocache = false;
$_smarty_tpl = $compiler->template;
eval("\$tpl_name = $include_file;");
if (!isset($compiler->smarty->merged_templates_func[$tpl_name][$uid]) || $compiler->inheritance) {
if (!isset($compiler->smarty->merged_templates_func[$tpl_name][$uid])) {
$tpl = new $compiler->smarty->template_class ($tpl_name, $compiler->smarty, $compiler->template, $compiler->template->cache_id, $compiler->template->compile_id);
// save unique function name
$compiler->smarty->merged_templates_func[$tpl_name][$uid]['func'] = $tpl->properties['unifunc'] = 'content_' . str_replace('.', '_', uniqid('', true));