[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc class.contacts_sql.inc.php
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc class.contacts_sql.inc.php |
Date: |
Sat, 03 Feb 2007 23:22:24 +0000 |
CVSROOT: /sources/phpgwapi
Module name: phpgwapi
Changes by: Sigurd Nes <sigurdne> 07/02/03 23:22:24
Modified files:
inc : class.contacts_sql.inc.php
Log message:
missing function
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.contacts_sql.inc.php?cvsroot=phpgwapi&r1=1.41&r2=1.42
Patches:
Index: class.contacts_sql.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/inc/class.contacts_sql.inc.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- class.contacts_sql.inc.php 26 Dec 2006 14:06:33 -0000 1.41
+++ class.contacts_sql.inc.php 3 Feb 2007 23:22:24 -0000 1.42
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package phpgwapi
* @subpackage contacts
- * @version $Id: class.contacts_sql.inc.php,v 1.41 2006/12/26 14:06:33
Caeies Exp $
+ * @version $Id: class.contacts_sql.inc.php,v 1.42 2007/02/03 23:22:24
sigurdne Exp $
* @internal Development of this application was funded by
http://www.sogrp.com
*/
@@ -2179,6 +2179,28 @@
}
/**
+ * Allow edit all location information of an contact
+ *
+ * @param integer $contact_id Contact Id that want to be edited.
+ * @param array $data Information for contact
+ * @param integer $action PHPGW_SQL_RETURN_SQL |
PHPGW_SQL_RUN_SQL depending what we want
+ * @return string SQL update string
+ */
+ function edit_location_by_contact($contact_id, $data,
$action=PHPGW_SQL_RETURN_SQL)
+ {
+ $loc = CreateObject('phpgwapi.contact_addr');
+ if(!isset($data['addr_modon']))
+ {
+ $data['addr_modon'] = $this->get_mkdate();
+ }
+ if(!isset($data['addr_modby']))
+ {
+ $data['addr_modby'] = $this->get_user_id();
+ }
+ return $loc->update($data,
sql_criteria::_equal('contact_id',sql::integer($contact_id)), $action);
+ }
+
+ /**
* Allow edit communication information of an contact
*
* @param integer $id Contact comm Id that want to be edited.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] phpgwapi/inc class.contacts_sql.inc.php,
Sigurd Nes <=