[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: cdb/inc class.cdb_contact_address.inc.php,1.1,1.
From: |
Brian Morel <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: cdb/inc class.cdb_contact_address.inc.php,1.1,1.2 |
Date: |
Fri, 15 Feb 2002 14:26:23 -0500 |
Update of /cvsroot/phpgroupware/cdb/inc
In directory subversions:/tmp/cvs-serv5014
Modified Files:
class.cdb_contact_address.inc.php
Log Message:
rewrote file for the new set up
Index: class.cdb_contact_address.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/cdb/inc/class.cdb_contact_address.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.cdb_contact_address.inc.php 11 Nov 2001 15:43:42 -0000 1.1
--- class.cdb_contact_address.inc.php 15 Feb 2002 19:26:19 -0000 1.2
***************
*** 3,7 ****
* phpGroupWare *
* http://www.phpgroupware.org/ *
! * This file written by Patrick Walsh <address@hidden> *
* ------------------------------------------------------------------------ *
* Please see the documentation for these classes in the README file in *
--- 3,7 ----
* phpGroupWare *
* http://www.phpgroupware.org/ *
! * This file written by Brian Morel < brianmorel AT yahoo DOT com > *
* ------------------------------------------------------------------------ *
* Please see the documentation for these classes in the README file in *
***************
*** 18,25 ****
class cdb_contact_address extends cdb_generic
{
function cdb_contact_address()
{
! $this->_=array(
! /* add vars that have get/let interface to this
array. */
);
}
--- 18,29 ----
class cdb_contact_address extends cdb_generic
{
+ var $_address_list;
+ var $_db;
+
function cdb_contact_address()
{
! $this->_db = $GLOBALS['phpgw']->db;
! /* add vars that have get/let interface to this array.
*/
! $this->_ = array(
);
}
***************
*** 27,42 ****
function save()
{
}
! function load($id)
! {
! }
!
! function create($category_id)
{
}
function get_address_list()
{
}
}
--- 31,66 ----
function save()
{
+ reset $this->_address_list;
+ $retval = FALSE;
+ while (list($key,$value) = $this->_address_list)
+ {
+ if ($value->save())
+ {
+ $retval = TRUE;
+ }
+ }
+ return $retval;
}
! function load($entity_id)
{
+ $this->_address_list = array();
+ $this->_id = $entity_id;
+ $this->_loaded = TRUE;
+ $sql = 'SELECT contact_address_id FROM
cdb_contact_address WHERE ' .
+ 'entity_id="' . $entity_id . '"';
+ $this->_db->query($sql,__LINE__,__FILE__);
+ while ($this->_db->next_record())
+ {
+ $this->_address_list[] =
CreateObject('cdb.cdb_address');
+ $x = $this->_db->f('contact_address_id');
+ $this->_address_list[$x]->load($x);
+ }
+ return TRUE;
}
function get_address_list()
{
+ return $this->_address_list;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: cdb/inc class.cdb_contact_address.inc.php,1.1,1.2,
Brian Morel <address@hidden> <=