- fix short append/prepend attributes in {block} tags

This commit is contained in:
Uwe.Tews
2009-12-12 10:50:40 +00:00
parent 5219139f6b
commit c5f8ceb5e9
3 changed files with 7 additions and 4 deletions

View File

@@ -1,3 +1,6 @@
12/12/2009
- fix short append/prepend attributes in {block} tags
12/11/2009
- bugfix on clear_compiled_tpl (avoid possible warning)

View File

@@ -69,9 +69,9 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase {
} else {
$this->smarty->block_data[$_name]['source'] = $block_content;
}
if (preg_match('/(.?)(append=true)(.*)/', $block_tag, $_match) != 0) {
if (preg_match('/(.?)(append)(.*)/', $block_tag, $_match) != 0) {
$this->smarty->block_data[$_name]['mode'] = 'append';
} elseif (preg_match('/(.?)(prepend=true)(.*)/', $block_tag, $_match) != 0) {
} elseif (preg_match('/(.?)(prepend)(.*)/', $block_tag, $_match) != 0) {
$this->smarty->block_data[$_name]['mode'] = 'prepend';
} else {
$this->smarty->block_data[$_name]['mode'] = 'replace';

View File

@@ -124,9 +124,9 @@ class Smarty_Internal_Resource_Extends {
} else {
$this->smarty->block_data[$_name]['source'] = $block_content;
}
if (preg_match('/(.?)(append=true)(.*)/', $block_tag, $_match) != 0) {
if (preg_match('/(.?)(append)(.*)/', $block_tag, $_match) != 0) {
$this->smarty->block_data[$_name]['mode'] = 'append';
} elseif (preg_match('/(.?)(prepend=true)(.*)/', $block_tag, $_match) != 0) {
} elseif (preg_match('/(.?)(prepend)(.*)/', $block_tag, $_match) != 0) {
$this->smarty->block_data[$_name]['mode'] = 'prepend';
} else {
$this->smarty->block_data[$_name]['mode'] = 'replace';