[prev in list] [next in list] [prev in thread] [next in thread] 

List:       smarty-cvs
Subject:    [SMARTY-CVS] cvs: smarty / Smarty_Compiler.class.php
From:       "Monte Ohrt" <monte () ispi ! net>
Date:       2003-01-24 16:08:32
[Download RAW message or body]

mohrt		Fri Jan 24 11:08:32 2003 EDT

  Modified files:              
    /smarty	Smarty_Compiler.class.php 
  Log:
  fix compiling problem with {foreach} tags
  
  
Index: smarty/Smarty_Compiler.class.php
diff -u smarty/Smarty_Compiler.class.php:1.150 smarty/Smarty_Compiler.class.php:1.151
--- smarty/Smarty_Compiler.class.php:1.150	Fri Jan 24 10:02:15 2003
+++ smarty/Smarty_Compiler.class.php	Fri Jan 24 11:08:31 2003
@@ -977,13 +977,13 @@
             $output .= "{$foreach_props}['show'] = {$foreach_props}['total'] > \
0;\n";  $output .= "if ({$foreach_props}['show']):\n";
             $output .= "{$foreach_props}['iteration'] = 0;\n";
-            $output .= "    foreach ((array)$from as $key_part$item):\n";
+            $output .= "    foreach ((array)$from as \
$key_part\$this->_tpl_vars['$item']):\n";  $output .= "        \
                {$foreach_props}['iteration']++;\n";
             $output .= "        {$foreach_props}['first'] = \
                ({$foreach_props}['iteration'] == 1);\n";
             $output .= "        {$foreach_props}['last']  = \
({$foreach_props}['iteration'] == {$foreach_props}['total']);\n";  } else {
             $output .= "if (count((array)$from)):\n";
-            $output .= "    foreach ((array)$from as $key_part$item):\n";
+            $output .= "    foreach ((array)$from as \
$key_part\$this->_tpl_vars['$item']):\n";  }
         $output .= '?>';
 



-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic