- bugfix {include} did not work inside nested {block} tags

This commit is contained in:
uwe.tews@googlemail.com
2011-09-20 17:27:45 +00:00
parent 2df84e24a6
commit bff28f38a4
2 changed files with 2 additions and 3 deletions

View File

@@ -2,6 +2,7 @@
20.09.2011
- bugfix removed debug echo output while compiling template inheritance
- bugfix relative paths in $template_dir broke relative path resolving in {include "../foo.tpl"}
- bugfix {include} did not work inside nested {block} tags
19.09.2011
- bugfix regression in Smarty_CacheReource_KeyValueStore introduced by r4261

View File

@@ -50,7 +50,7 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase {
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
$save = array($_attr, $compiler->parser->current_buffer, $compiler->nocache, $compiler->smarty->merge_compiled_includes, $compiler->merged_templates);
$save = array($_attr, $compiler->parser->current_buffer, $compiler->nocache, $compiler->smarty->merge_compiled_includes);
$this->openTag($compiler, 'block', $save);
if ($_attr['nocache'] == true) {
$compiler->nocache = true;
@@ -212,11 +212,9 @@ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_CompileBase {
$saved_data = $this->closeTag($compiler, array('block'));
$_name = trim($saved_data[0]['name'], "\"'");
if (isset($compiler->template->block_data[$_name]) && !isset($compiler->template->block_data[$_name]['compiled'])) {
$compiler->merged_templates = $saved_data[4];
$_output = Smarty_Internal_Compile_Block::compileChildBlock($compiler, $_name);
} else {
if (isset($saved_data[0]['hide']) && !isset($compiler->template->block_data[$_name]['source'])) {
$compiler->merged_templates = $saved_data[4];
$_output = '';
} else {
$_output = $compiler->parser->current_buffer->to_smarty_php();