From zeta-commits-return-257-apmail-incubator-zeta-commits-archive=incubator.apache.org@incubator.apache.org Sun Jan 23 22:02:44 2011 Return-Path: Delivered-To: apmail-incubator-zeta-commits-archive@minotaur.apache.org Received: (qmail 74356 invoked from network); 23 Jan 2011 22:02:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Jan 2011 22:02:44 -0000 Received: (qmail 35828 invoked by uid 500); 23 Jan 2011 22:02:41 -0000 Delivered-To: apmail-incubator-zeta-commits-archive@incubator.apache.org Received: (qmail 35547 invoked by uid 500); 23 Jan 2011 22:02:41 -0000 Mailing-List: contact zeta-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zeta-dev@incubator.apache.org Delivered-To: mailing list zeta-commits@incubator.apache.org Received: (qmail 35382 invoked by uid 99); 23 Jan 2011 22:02:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Jan 2011 22:02:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Jan 2011 22:02:38 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D804623888D2; Sun, 23 Jan 2011 22:02:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Date: Sun, 23 Jan 2011 22:02:17 -0000 To: zeta-commits@incubator.apache.org From: toby@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110123220217.D804623888D2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Subject: [zeta-commits] svn commit: r1062540 - in /incubator/zetacomponents/trunk/Template/src/functions: array_functions.php functions.php 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;