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

"Messju Mohr" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmessju1104921611@cvsserver>
messju		Wed Jan  5 05:40:11 2005 EDT

  Modified files:              
    /smarty	NEWS 
    /smarty/libs	Smarty_Compiler.class.php 
  Log:
  make block functions and registered objects' block methods use a
  local variable for block_content instead of $this->_block_content
  
  it's not necessary to have $smarty->_block_content accessible.
  
  
  
http://cvs.php.net/diff.php/smarty/NEWS?r1=1.482&r2=1.483&ty=u
Index: smarty/NEWS
diff -u smarty/NEWS:1.482 smarty/NEWS:1.483
--- smarty/NEWS:1.482	Fri Dec 17 03:30:56 2004
+++ smarty/NEWS	Wed Jan  5 05:40:11 2005
@@ -1,3 +1,5 @@
+  - make block functions and registered objects' block methods use a
+    local variable for block_content instead of a property of $smarty (messju)
   - fix escaping in the generated code that calls smarty_core_load_plugins
     (jes5199, messju)
   - fix invalid HTML issue with popup (Stefanos Harhalakis,
http://cvs.php.net/diff.php/smarty/libs/Smarty_Compiler.class.php?r1=1.353&r2=1.354&ty=u
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.353 smarty/libs/Smarty_Compiler.class.php:1.354
--- smarty/libs/Smarty_Compiler.class.php:1.353	Sat Jan  1 06:58:21 2005
+++ smarty/libs/Smarty_Compiler.class.php	Wed Jan  5 05:40:11 2005
@@ -26,7 +26,7 @@
  * @package Smarty
  */
 
-/* $Id: Smarty_Compiler.class.php,v 1.353 2005/01/01 11:58:21 messju Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.354 2005/01/05 10:40:11 messju Exp $ */
 
 /**
  * Template compiling class
@@ -712,8 +712,8 @@
             $output .= $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat=true);';
             $output .= 'while ($_block_repeat) { ob_start(); ?>';
         } else {
-            $output = '<?php $this->_block_content = ob_get_contents(); ob_end_clean(); ';
-            $_out_tag_text = $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], $this->_block_content, $this, $_block_repeat=false)';
+            $output = '<?php $_block_content = ob_get_contents(); ob_end_clean(); ';
+            $_out_tag_text = $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat=false)';
             if ($tag_modifier != '') {
                 $this->_parse_modifiers($_out_tag_text, $tag_modifier);
             }
@@ -860,8 +860,8 @@
                     $return = null;
                     $postfix = '';
             } else {
-                    $prefix = "\$this->_obj_block_content = ob_get_contents(); ob_end_clean(); ";
-                    $return = "\$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$this->_obj_block_content, \$this, \$_block_repeat=false)";
+                    $prefix = "\$_obj_block_content = ob_get_contents(); ob_end_clean(); ";
+                    $return = "\$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat=false)";
                     $postfix = "} array_pop(\$this->_tag_stack);";
                 }
             } else {

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.