mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
- bugfix existing child {block} tag must override parent {block} tag append / prepend setting (topic 25259)
This commit is contained in:
@@ -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)
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user