- bugfix when merging compiled templates and objects are passed as parameter of the {include} tag

This commit is contained in:
Uwe.Tews
2010-05-06 17:59:31 +00:00
parent bf591a307b
commit 98753671e3
2 changed files with 7 additions and 3 deletions

View File

@@ -1,3 +1,6 @@
06/05/2010
- bugfix when merging compiled templates and objects are passed as parameter of the {include} tag
05/05/2010
- bugfix on {insert} to cache parameter
- implementation of $smarty->default_modifiers as in Smarty2

View File

@@ -42,11 +42,12 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase {
}
if ($tpl->resource_object->usesCompiler && $tpl->isExisting()) {
// make sure that template is up to date and merge template properties
$tpl->renderTemplate();
// $tpl->renderTemplate(); // 06/05/2010
$compiled_tpl = $tpl->getCompiledTemplate(); // 06/05/2010
// compiled code for {function} tags
$compiler->template->properties['function'] = array_merge($compiler->template->properties['function'], $tpl->properties['function']);
// get compiled code
$compiled_tpl = $tpl->getCompiledTemplate();
// $compiled_tpl = $tpl->getCompiledTemplate(); // 06/05/2010
// remove header code
$compiled_tpl = preg_replace("/(<\?php \/\*%%SmartyHeaderCode:{$tpl->properties['nocache_hash']}%%\*\/(.+?)\/\*\/%%SmartyHeaderCode%%\*\/\?>\n)/s", '', $compiled_tpl);
if ($tpl->has_nocache_code) {
@@ -142,4 +143,4 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase {
}
}
?>
?>