[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] sync/inc/class.so_sync.inc.php, 1.40
From: |
nomail |
Subject: |
[Phpgroupware-cvs] sync/inc/class.so_sync.inc.php, 1.40 |
Date: |
Thu, 13 May 2004 18:47:14 +0200 |
Update of /sync/inc
Modified Files:
Branch:
class.so_sync.inc.php
date: 2004/05/13 16:47:14; author: mkaemmerer; state: Exp; lines: +35 -3
Log Message:
- removed outdated logging functions
- added function AddConflict
=====================================================================
Index: sync/inc/class.so_sync.inc.php
diff -u sync/inc/class.so_sync.inc.php:1.39 sync/inc/class.so_sync.inc.php:1.40
--- sync/inc/class.so_sync.inc.php:1.39 Tue May 4 18:36:07 2004
+++ sync/inc/class.so_sync.inc.php Thu May 13 16:47:14 2004
@@ -779,14 +779,46 @@
{
$channel = $this->GetChannelIDfromSourceAndDeviceID($deviceid,
$source);
$result = $channel;
- error_log($result);
+
if ($channel >= 0)
{
$result = $this->DeleteMappings($channel);
- error_log($result);
}
}
return $result;
}
+
+ /******************************************************************/
+ /** functions for phpgw_syncconflicts *****************************/
+ /******************************************************************/
+
+ /**
+ *
+ * Add one record to the syncconflicts database
+ *
+ * This function uses the current timestamp for the database field timestamp
+ *
+ * @param integer $deviceid unique device ID for internal devices database
+ * @param string $source Source name from device (e.g. 'contacts')
+ * @param string $LUID local identifier of a record in the source (local
recordid of the syncdevice)
+ * @param string $ldata data value of the record from the device
+ * @return integer >= 0 if successfull, < 0 in case of error
+ */
+
+ function AddConfict($deviceid, $source, $LUID, $LData)
+ {
+ $channelid = $this->GetChannelIDfromSourceAndDeviceID($deviceid, $source);
+
+ if ($channelid >= 0)
+ {
+ $GLOBALS['phpgw']->db->query("INSERT INTO phpgw_syncconflicts
(channelid, luid, ldata, timestamp) "
+ . "VALUES
('".$channelid."','".$LUID."','".$LData."','".$GLOBALS['phpgw']->db->to_timestamp(time())."')",__LINE__,__FILE__);
+ return $GLOBALS['phpgw']->db->get_last_insert_id('phpgw_syncdevices',
'deviceid');
+ } else {
+ // return error value from GetChanelIDfromSourceAndDeviceID
+ return $channelid;
+ }
+ }
+
}
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] sync/inc/class.so_sync.inc.php, 1.40,
nomail <=