diff options
| author | Uwe.Tews@googlemail.com <Uwe.Tews@googlemail.com> | 2013-10-28 18:24:01 +0000 |
|---|---|---|
| committer | Uwe.Tews@googlemail.com <Uwe.Tews@googlemail.com> | 2013-10-28 18:24:01 +0000 |
| commit | 26e4a5120ecb284df3e264b7cb822ab59cb1f9a1 (patch) | |
| tree | b78d9f2e617ef63889a022d0bcd05329b1610278 | |
| parent | 8342cf45f31a1bbaf8995d90ad7a4744431ebfe6 (diff) | |
| download | smarty-26e4a5120ecb284df3e264b7cb822ab59cb1f9a1.tar.gz smarty-26e4a5120ecb284df3e264b7cb822ab59cb1f9a1.tar.bz2 smarty-26e4a5120ecb284df3e264b7cb822ab59cb1f9a1.zip | |
- bugfix variable resource name at custom resource plugin did not work within {block} tags (Issue 163)
| -rw-r--r-- | change_log.txt | 3 | ||||
| -rw-r--r-- | 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; |
