From 98753671e3c680d37517486481f6e4013fa2861d Mon Sep 17 00:00:00 2001 From: "Uwe.Tews" Date: Thu, 6 May 2010 17:59:31 +0000 Subject: [PATCH] - bugfix when merging compiled templates and objects are passed as parameter of the {include} tag --- change_log.txt | 3 +++ libs/sysplugins/smarty_internal_compile_include.php | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/change_log.txt b/change_log.txt index ed66c9b7..3c88838f 100644 --- a/change_log.txt +++ b/change_log.txt @@ -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 diff --git a/libs/sysplugins/smarty_internal_compile_include.php b/libs/sysplugins/smarty_internal_compile_include.php index f82f038e..266e80a1 100644 --- a/libs/sysplugins/smarty_internal_compile_include.php +++ b/libs/sysplugins/smarty_internal_compile_include.php @@ -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 { } } -?> +?> \ No newline at end of file