[Pieforms-commit] SF.net SVN: pieforms: [168] pieforms-php5/trunk/src/pieform/renderers/ multicolum
Status: Alpha
Brought to you by:
oracleshinoda
|
From: <ora...@us...> - 2007-01-20 08:02:14
|
Revision: 168
http://svn.sourceforge.net/pieforms/?rev=168&view=rev
Author: oracleshinoda
Date: 2007-01-20 00:02:11 -0800 (Sat, 20 Jan 2007)
Log Message:
-----------
Allow the entries to be keyed by 'key' instead of title, just in case the title is not unique for some reason
Modified Paths:
--------------
pieforms-php5/trunk/src/pieform/renderers/multicolumntable.php
Modified: pieforms-php5/trunk/src/pieform/renderers/multicolumntable.php
===================================================================
--- pieforms-php5/trunk/src/pieform/renderers/multicolumntable.php 2007-01-11 09:48:45 UTC (rev 167)
+++ pieforms-php5/trunk/src/pieform/renderers/multicolumntable.php 2007-01-20 08:02:11 UTC (rev 168)
@@ -102,14 +102,18 @@
if ($rawelement['type'] == 'fieldset') {
throw new PieformException('The multicolumntable renderer does not support fieldsets');
}
- if (!array_key_exists($rawelement['title'], $this->elements)) {
- $this->elements[$rawelement['title']] = array();
- $this->elements[$rawelement['title']]['rawelements'] = array();
- $this->elements[$rawelement['title']]['builtelements'] = array();
- $this->elements[$rawelement['title']]['settings'] = $rawelement;
+
+ if (!isset($rawelement['key'])) {
+ $rawelement['key'] = $rawelement['title'];
}
- $this->elements[$rawelement['title']]['rawelements'][] = $rawelement;
- $this->elements[$rawelement['title']]['builtelements'][] = $builtelement;
+ if (!array_key_exists($rawelement['key'], $this->elements)) {
+ $this->elements[$rawelement['key']] = array();
+ $this->elements[$rawelement['key']]['rawelements'] = array();
+ $this->elements[$rawelement['key']]['builtelements'] = array();
+ $this->elements[$rawelement['key']]['settings'] = $rawelement;
+ }
+ $this->elements[$rawelement['key']]['rawelements'][] = $rawelement;
+ $this->elements[$rawelement['key']]['builtelements'][] = $builtelement;
}
function set_form(Pieform $form) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|