From 26e4a5120ecb284df3e264b7cb822ab59cb1f9a1 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews@googlemail.com" Date: Mon, 28 Oct 2013 18:24:01 +0000 Subject: [PATCH] - bugfix variable resource name at custom resource plugin did not work within {block} tags (Issue 163) --- change_log.txt | 3 +++ libs/sysplugins/smarty_internal_compile_include.php | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/change_log.txt b/change_log.txt index 7e93d057..a1d38610 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== trunk ===== + 28.10.2013 + - bugfix variable resource name at custom resource plugin did not work within {block} tags (Issue 163) + 20.10.2013 - bugfix a variable file name at {extends} tag did fail (forum topic 24618) diff --git a/libs/sysplugins/smarty_internal_compile_include.php b/libs/sysplugins/smarty_internal_compile_include.php index 067bd587..a0812c84 100644 --- a/libs/sysplugins/smarty_internal_compile_include.php +++ b/libs/sysplugins/smarty_internal_compile_include.php @@ -85,7 +85,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase $_caching = Smarty::CACHING_OFF; // flag if included template code should be merged into caller - $merge_compiled_includes = ($compiler->smarty->merge_compiled_includes || $_attr['inline'] === true) && !$compiler->template->source->recompiled; + $merge_compiled_includes = ($compiler->smarty->merge_compiled_includes || $compiler->inheritance || $_attr['inline'] === true) && !$compiler->template->source->recompiled; // set default when in nocache mode // if ($compiler->template->caching && ($compiler->nocache || $compiler->tag_nocache || $compiler->forceNocache == 2)) { @@ -121,7 +121,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase } if ($_attr['nocache'] === true) { $compiler->tag_nocache = true; - if ($merge_compiled_includes || $compiler->inheritance) { + if ($merge_compiled_includes) { $_caching = self::CACHING_NOCACHE_CODE; } else { $_caching = Smarty::CACHING_OFF; @@ -129,7 +129,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase } $has_compiled_template = false; - if ($merge_compiled_includes || $compiler->inheritance) { + if ($merge_compiled_includes) { // variable template name ? if ($compiler->has_variable_string || !((substr_count($include_file, '"') == 2 || substr_count($include_file, "'") == 2)) || substr_count($include_file, '(') != 0 || substr_count($include_file, '$_smarty_tpl->') != 0 @@ -151,7 +151,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase } } } - if ($merge_compiled_includes || $compiler->inheritance) { + if ($merge_compiled_includes) { // we must observe different compile_id $uid = sha1($_compile_id); $tpl_name = null;