cvs: smarty / NEWS /libs Smarty_Compiler.class.php

[email protected] ("Messju Mohr") Sat, 22 Apr 2006 08:16:57 -0000
Newsgroups php.smarty.cvs
Message-ID <cvsmessju1145693817@cvsserver>
messju		Sat Apr 22 08:16:57 2006 UTC

  Modified files:              
    /smarty	NEWS 
    /smarty/libs	Smarty_Compiler.class.php 
  Log:
  fix handling of block-methods of registered objects
  thanks to El Hombre Gris
  
  
  
http://cvs.php.net/viewcvs.cgi/smarty/NEWS?r1=1.526&r2=1.527&diff_format=u
Index: smarty/NEWS
diff -u smarty/NEWS:1.526 smarty/NEWS:1.527
--- smarty/NEWS:1.526	Thu Mar  9 21:01:39 2006
+++ smarty/NEWS	Sat Apr 22 08:16:57 2006
@@ -1,3 +1,6 @@
+- fix handling of block-methods of registered objects (El Hombre Gris,
+  messju)
+
 Version 2.6.13 (March 9th, 2006)
 --------------------------------
 
http://cvs.php.net/viewcvs.cgi/smarty/libs/Smarty_Compiler.class.php?r1=1.378&r2=1.379&diff_format=u
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.378 smarty/libs/Smarty_Compiler.class.php:1.379
--- smarty/libs/Smarty_Compiler.class.php:1.378	Sun Jan 29 18:11:22 2006
+++ smarty/libs/Smarty_Compiler.class.php	Sat Apr 22 08:16:57 2006
@@ -26,7 +26,7 @@
  * @package Smarty
  */
 
-/* $Id: Smarty_Compiler.class.php,v 1.378 2006/01/29 18:11:22 messju Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.379 2006/04/22 08:16:57 messju Exp $ */
 
 /**
  * Template compiling class
@@ -880,9 +880,9 @@
                     $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 {