[limb-svn] r6426 - in 3.x/trunk/limb/wact/src: . components/form
svn at limb-project.com
svn at limb-project.com
Tue Oct 16 14:36:28 MSD 2007
Author: serega
Date: 2007-10-16 14:36:28 +0400 (Tue, 16 Oct 2007)
New Revision: 6426
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6426
Modified:
3.x/trunk/limb/wact/src/WactTemplate.class.php
3.x/trunk/limb/wact/src/components/form/WactFormElementComponent.class.php
Log:
-- fixed WactTemplate :: getValue and setValue for cases then datasource both supports ArrayAccess and get methods
Modified: 3.x/trunk/limb/wact/src/WactTemplate.class.php
===================================================================
--- 3.x/trunk/limb/wact/src/WactTemplate.class.php 2007-10-16 08:13:48 UTC (rev 6425)
+++ 3.x/trunk/limb/wact/src/WactTemplate.class.php 2007-10-16 10:36:28 UTC (rev 6426)
@@ -78,8 +78,13 @@
if(is_scalar($source) || is_null($source))
return null;
- if((is_array($source) || $source instanceof ArrayAccess) && isset($source[$value]))
- return $source[$value];
+ if((is_array($source) || $source instanceof ArrayAccess))
+ {
+ if(isset($source[$value]))
+ return $source[$value];
+ else
+ return null;
+ }
if (is_object($source) && method_exists($source, 'get'))
return $source->get($value);
@@ -93,7 +98,10 @@
return;
if((is_array($source) || $source instanceof ArrayAccess))
+ {
$source[$field] = $value;
+ return;
+ }
if (is_object($source) && method_exists($source, 'set'))
{
Modified: 3.x/trunk/limb/wact/src/components/form/WactFormElementComponent.class.php
===================================================================
--- 3.x/trunk/limb/wact/src/components/form/WactFormElementComponent.class.php 2007-10-16 08:13:48 UTC (rev 6425)
+++ 3.x/trunk/limb/wact/src/components/form/WactFormElementComponent.class.php 2007-10-16 10:36:28 UTC (rev 6426)
@@ -2,9 +2,9 @@
/*
* Limb PHP Framework
*
- * @link http://limb-project.com
+ * @link http://limb-project.com
* @copyright Copyright © 2004-2007 BIT(http://bit-creative.com)
- * @license LGPL http://www.gnu.org/copyleft/lesser.html
+ * @license LGPL http://www.gnu.org/copyleft/lesser.html
*/
/**
More information about the limb-svn
mailing list