cvs: pear /Structures_DataGrid/DataGrid/DataSource DataObject.php

From: Date: Fri, 27 May 2005 14:44:23 +0000
Subject: cvs: pear /Structures_DataGrid/DataGrid/DataSource DataObject.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-32154@lists.php.net to get a copy of this message
asnagy Fri May 27 10:44:23 2005 EDT Modified files: /pear/Structures_DataGrid/DataGrid/DataSource DataObject.php Log: Implemented fixed for DataObject Driver errors when using links. Bug #4421 Submitted by Justin Patrin. http://cvs.php.net/diff.php/pear/Structures_DataGrid/DataGrid/DataSource/DataObject.php?r1=1.20&r2=1.21&ty=u Index: pear/Structures_DataGrid/DataGrid/DataSource/DataObject.php diff -u pear/Structures_DataGrid/DataGrid/DataSource/DataObject.php:1.20 pear/Structures_DataGrid/DataGrid/DataSource/DataObject.php:1.21 --- pear/Structures_DataGrid/DataGrid/DataSource/DataObject.php:1.20 Thu Mar 31 13:19:13 2005 +++ pear/Structures_DataGrid/DataGrid/DataSource/DataObject.php Fri May 27 10:44:22 2005 @@ -17,7 +17,7 @@ // | Andrew Nagy <asnagy@webitecture.org> | // +----------------------------------------------------------------------+ // -// $Id: DataObject.php,v 1.20 2005/03/31 18:19:13 asnagy Exp $ +// $Id: DataObject.php,v 1.21 2005/05/27 14:44:22 asnagy Exp $ require_once 'Structures/DataGrid/DataSource.php'; @@ -38,7 +38,7 @@ * same kind of information as the "fields" options. If the "fields" * option is set, this one will not be used. Default : "fb_fieldsToRender". * - * @version $Revision: 1.20 $ + * @version $Revision: 1.21 $ * @author Olivier Guilyardi <olivier@samalyse.com> * @author Andrew Nagy <asnagy@webitecture.org> * @access public @@ -237,7 +237,9 @@ if ($this->_options['formbuilder_integration']) { foreach (array_keys($rec) as $field) { if (isset($links[$field]) && - $linkedDo =& $this->_dataobject->getLink($field)) { + isset($this->_dataobject->$field) && + $linkedDo =& $this->_dataobject->getLink($field) && + !PEAR::isError($linkedDo)) { $rec[$field] = DB_DataObject_FormBuilder::getDataObjectString($linkedDo); } }

« previous php.pear.cvs (#32154) next »