- fixed error in {include} tag with variable file attribute

This commit is contained in:
Uwe.Tews
2009-04-20 14:08:02 +00:00
parent 152cedb75c
commit 73fe38c488
2 changed files with 8 additions and 5 deletions

View File

@@ -1,3 +1,7 @@
04/20/2009
- fixed error in {include} tag with variable file attribute
04/18/2009 04/18/2009
- added stream resources ($smarty->display('mystream://mytemplate')) - added stream resources ($smarty->display('mystream://mytemplate'))
- added stream variables {$mystream:myvar} - added stream variables {$mystream:myvar}

View File

@@ -66,12 +66,11 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase {
} }
} }
if ($this->compiler->tag_nocache == false) { // if ($this->compiler->tag_nocache == false) {
// save file dependency // save file dependency
$_template = new Smarty_Template (trim($include_file,'\'')); // $compiler->template->file_dependency['file_dependency'][] = array($_template->getTemplateFilepath(), $_template->getTemplateTimestamp());
$compiler->template->file_dependency['file_dependency'][] = array($_template->getTemplateFilepath(), $_template->getTemplateTimestamp()); // unset ($_template);
unset ($_template); // }
}
// create template object // create template object
$_output = "<?php \$_template = new Smarty_Template ($include_file, \$_smarty_tpl, \$_smarty_tpl->cache_id, \$_smarty_tpl->compile_id);"; $_output = "<?php \$_template = new Smarty_Template ($include_file, \$_smarty_tpl, \$_smarty_tpl->cache_id, \$_smarty_tpl->compile_id);";
// delete {include} standard attributes // delete {include} standard attributes