mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
- bugfix {include} did not work inside nested {block} tags
This commit is contained in:
@@ -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
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user