- bugfix template inheritance: {$smarty.block.child} in nested child {block} tags did not return

content after {$smarty.block.child} (Forum Topic 20564)
This commit is contained in:
uwe.tews@googlemail.com
2011-12-20 15:52:59 +00:00
parent dae58ebd3e
commit ea567850b0
2 changed files with 230 additions and 226 deletions

View File

@@ -1,4 +1,8 @@
===== trunk =====
20.12.2011
- bugfix template inheritance: {$smarty.block.child} in nested child {block} tags did not return
content after {$smarty.block.child} (Forum Topic 20564)
===== Smarty-3.1.7 =====
18.12.2011
- bugfix strings ending with " in multiline strings of config files failed to compile (isse #67)

View File

@@ -99,8 +99,8 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase {
$replacement = '';
}
// replace {$smarty.block.child} tag
$search = array("%({$_ldl}{$al}block[\s\S]*?{$name}[\s\S]*?{$_rdl})([\s\S]*?)({$_ldl}{$al}\\\$smarty\.block\.child{$_rdl})([\s\S]*?{$_ldl}{$al}/block{$_rdl})%","/<2F><><EFBFBD>child<6C><64><EFBFBD>/");
$replace = array('\2<><32><EFBFBD>child<6C><64><EFBFBD>', $replacement);
$search = array("%({$_ldl}{$al}block[\s\S]*?{$name}[\s\S]*?{$_rdl})([\s\S]*?)({$_ldl}{$al}\\\$smarty\.block\.child{$_rdl})([\s\S]*?)({$_ldl}{$al}/block{$_rdl})%","/<2F><><EFBFBD>child<6C><64><EFBFBD>/");
$replace = array('\2<><32><EFBFBD>child<6C><64><EFBFBD>\4', $replacement);
$block_content = preg_replace($search, $replace , $block_content);
}
}