- fixed merging of recursive includes

This commit is contained in:
uwe.tews
2009-10-24 09:27:53 +00:00
parent f88b868d5a
commit 6c7c18d79f
2 changed files with 160 additions and 157 deletions

View File

@@ -1,5 +1,6 @@
10/24/2009
- fixed nocache vars at internal block tags
- fixed merging of recursive includes
10/23/2009
- fixed nocache var problem

View File

@@ -34,6 +34,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase {
// check if compiled code can be merged (contains no variable part)
if (!$compiler->has_variable_string && (substr_count($include_file, '"') == 2 or substr_count($include_file, "'") == 2) and substr_count($include_file, '(') == 0) {
eval("\$tmp = $include_file;");
if ($this->compiler->template->template_resource != $tmp) {
$tpl = $compiler->smarty->createTemplate ($tmp, $compiler->template->cache_id, $compiler->template->compile_id, $compiler->template);
if ($tpl->isExisting()) {
do {
@@ -70,6 +71,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase {
}
}
}
}
if (isset($_attr['assign'])) {
// output will be stored in a smarty variable instead of beind displayed