From c5f8ceb5e9b53922a4c7f1674261d5c7b9c86940 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews" Date: Sat, 12 Dec 2009 10:50:40 +0000 Subject: [PATCH] - fix short append/prepend attributes in {block} tags --- change_log.txt | 3 +++ libs/sysplugins/smarty_internal_compile_extends.php | 4 ++-- libs/sysplugins/smarty_internal_resource_extends.php | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) 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';