- bugfix for multiple {/block} tags on same line

This commit is contained in:
Uwe.Tews
2010-03-19 15:45:32 +00:00
parent d89e53c2f6
commit 6d2fb922e9
3 changed files with 5 additions and 2 deletions

View File

@@ -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

View File

@@ -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) {

View File

@@ -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) {