diff --git a/change_log.txt b/change_log.txt index dd630d77..d0549477 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,3 +1,6 @@ +19/03/2010 +- bugfix for multiple {/block} tags on same line + 17/03/2010 - bugfix make $smarty->cache->clear() function independent from caching status diff --git a/libs/sysplugins/smarty_internal_compile_extends.php b/libs/sysplugins/smarty_internal_compile_extends.php index ed6ab4f1..875e17b7 100644 --- a/libs/sysplugins/smarty_internal_compile_extends.php +++ b/libs/sysplugins/smarty_internal_compile_extends.php @@ -41,7 +41,7 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase { preg_match_all("!({$this->_ldl}/block(.*?){$this->_rdl})!", $_content, $c)) { $this->compiler->trigger_template_error('unmatched {block} {/block} pairs'); } - preg_match_all("!{$this->_ldl}block(.+?){$this->_rdl}|{$this->_ldl}/block.*{$this->_rdl}!", $_content, $_result, PREG_OFFSET_CAPTURE); + preg_match_all("!{$this->_ldl}block(.+?){$this->_rdl}|{$this->_ldl}/block(.*?){$this->_rdl}!", $_content, $_result, PREG_OFFSET_CAPTURE); $_result_count = count($_result[0]); $_start = 0; while ($_start < $_result_count) { diff --git a/libs/sysplugins/smarty_internal_resource_extends.php b/libs/sysplugins/smarty_internal_resource_extends.php index 64526346..c4f588a6 100644 --- a/libs/sysplugins/smarty_internal_resource_extends.php +++ b/libs/sysplugins/smarty_internal_resource_extends.php @@ -102,7 +102,7 @@ class Smarty_Internal_Resource_Extends { preg_match_all("!({$this->_ldl}/block(.*?){$this->_rdl})!", $_content, $_close)) { $this->smarty->trigger_error("unmatched {block} {/block} pairs in file '$_filepath'"); } - preg_match_all("!{$this->_ldl}block(.+?){$this->_rdl}|{$this->_ldl}/block.*{$this->_rdl}!", $_content, $_result, PREG_OFFSET_CAPTURE); + preg_match_all("!{$this->_ldl}block(.+?){$this->_rdl}|{$this->_ldl}/block(.*?){$this->_rdl}!", $_content, $_result, PREG_OFFSET_CAPTURE); $_result_count = count($_result[0]); $_start = 0; while ($_start < $_result_count) {