incubator-zeta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [zeta-commits] svn commit: r1062540 - in /incubator/zetacomponents/trunk/Template/src/functions: array_functions.php functions.php
Date Sun, 23 Jan 2011 22:02:17 GMT
Author: toby
Date: Sun Jan 23 22:02:17 2011
New Revision: 1062540

URL: http://svn.apache.org/viewvc?rev=1062540&view=rev
Log:
- Fixed #ZETACOMP-43: Support internal functions with only optional parameters.
- Fixed: Definition of the array_pad() function.
# This one was incorrect anyway, but through #ZETACOMP-43 this had no effect.

Modified:
    incubator/zetacomponents/trunk/Template/src/functions/array_functions.php
    incubator/zetacomponents/trunk/Template/src/functions/functions.php

Modified: incubator/zetacomponents/trunk/Template/src/functions/array_functions.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/Template/src/functions/array_functions.php?rev=1062540&r1=1062539&r2=1062540&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/Template/src/functions/array_functions.php (original)
+++ incubator/zetacomponents/trunk/Template/src/functions/array_functions.php Sun Jan 23 22:02:17
2011
@@ -189,7 +189,7 @@ class ezcTemplateArrayFunctions extends 
 
                if ( self::countParameters( $parameters ) == 2 )
                {
-                    return array( ezcTemplateAstNode::TYPE_ARRAY, array( "[%array]", "%length",
"%pad" ), 
+                    return array( ezcTemplateAstNode::TYPE_ARRAY, array( "%length", "%pad"
), 
                         self::functionCall( "array_pad", array( self::functionCall( "array",
array() ), "%length", "%pad" ) ) );
                }
                else

Modified: incubator/zetacomponents/trunk/Template/src/functions/functions.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/Template/src/functions/functions.php?rev=1062540&r1=1062539&r2=1062540&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/Template/src/functions/functions.php (original)
+++ incubator/zetacomponents/trunk/Template/src/functions/functions.php Sun Jan 23 22:02:17
2011
@@ -300,7 +300,7 @@ class ezcTemplateFunctions
         $i = 0;
         foreach ( $functionDefinition[ $index ] as $p )
         {
-            if ( self::isOptional( $p ) && $realParameters < $definedParameters)
+            if ( self::isOptional( $p ) && $realParameters < $i )
             {
                 // We should skip this parameter.
                 $parameterMap[$p] = null;



Mime
View raw message