fix handling of block-methods of registered objects

thanks to El Hombre Gris
This commit is contained in:
messju
2006-04-22 08:16:57 +00:00
parent a19c3348a0
commit 694d6ddcc2
2 changed files with 6 additions and 3 deletions

3
NEWS
View File

@@ -1,3 +1,6 @@
- fix handling of block-methods of registered objects (El Hombre Gris,
messju)
Version 2.6.13 (March 9th, 2006)
--------------------------------

View File

@@ -880,9 +880,9 @@ class Smarty_Compiler extends Smarty {
$prefix .= "while (\$_block_repeat) { ob_start();";
$return = null;
$postfix = '';
} else {
$prefix = "\$_obj_block_content = ob_get_contents(); ob_end_clean(); ";
$return = "\$_block_repeat=false; \$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat)";
} else {
$prefix = "\$_obj_block_content = ob_get_contents(); ob_end_clean(); \$_block_repeat=false;";
$return = "\$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat)";
$postfix = "} array_pop(\$this->_tag_stack);";
}
} else {