- bugfix existing child {block} tag must override parent {block} tag append / prepend setting (topic 25259)

This commit is contained in:
Uwe.Tews@googlemail.com
2014-10-01 21:03:40 +00:00
parent 7add711ea0
commit 2a311c5473
2 changed files with 7 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
===== 3.1.20-dev ===== (xx.xx.2014)
01.10.2014
- bugfix template resource of inheritance blocks could get invalid if the default resource type is not 'file'(Issue 202)
- bugfix existing child {block} tag must override parent {block} tag append / prepend setting (topic 25259)
02.08.2014
- bugfix modifier wordwrap did output break string wrong if first word was exceeding length with cut = true (topic 25193)

View File

@@ -78,6 +78,12 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase
$_attr = $this->getAttributes($compiler, $args);
$_name = trim($_attr['name'], "\"'");
// existing child must override parent settings
if (isset($compiler->template->block_data[$_name]) && $compiler->template->block_data[$_name]['mode'] == 'replace') {
$_attr['append'] = false;
$_attr['prepend'] = false;
}
// check if we process an inheritance child template
if ($compiler->inheritance_child) {
array_unshift(self::$nested_block_names, $_name);