[Pieforms-commit] SF.net SVN: pieforms: [59] pieforms-php5/trunk/src/pieform.php
Status: Alpha
Brought to you by:
oracleshinoda
From: <ora...@us...> - 2006-11-21 12:34:56
|
Revision: 59 http://svn.sourceforge.net/pieforms/?rev=59&view=rev Author: oracleshinoda Date: 2006-11-21 04:34:54 -0800 (Tue, 21 Nov 2006) Log Message: ----------- Allow the element name to be set in the element array itself. Compatibility with the future perl version Modified Paths: -------------- pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2006-11-21 01:53:20 UTC (rev 58) +++ pieforms-php5/trunk/src/pieform.php 2006-11-21 12:34:54 UTC (rev 59) @@ -401,6 +401,10 @@ // Set some attributes for all elements $autofocusadded = false; foreach ($this->elements as $name => &$element) { + // The name can be in the element itself. This is compatibility for the perl version + if (isset($element['name'])) { + $name = $element['name']; + } if (count($element) == 0) { throw new PieformException('An element in form "' . $this->name . '" has no data'); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |