diff --git a/change_log.txt b/change_log.txt index 24bbc016..2fecc013 100644 --- a/change_log.txt +++ b/change_log.txt @@ -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) diff --git a/libs/sysplugins/smarty_internal_compile_extends.php b/libs/sysplugins/smarty_internal_compile_extends.php index 7cb54e13..e34efeb6 100644 --- a/libs/sysplugins/smarty_internal_compile_extends.php +++ b/libs/sysplugins/smarty_internal_compile_extends.php @@ -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'; diff --git a/libs/sysplugins/smarty_internal_resource_extends.php b/libs/sysplugins/smarty_internal_resource_extends.php index 685ff55e..92ccf610 100644 --- a/libs/sysplugins/smarty_internal_resource_extends.php +++ b/libs/sysplugins/smarty_internal_resource_extends.php @@ -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';