[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.48
From: |
nomail |
Subject: |
[Phpgroupware-cvs] sync/inc/class.so_sync.inc.php, 1.48 |
Date: |
Tue, 6 Jul 2004 12:11:40 +0200 |
Update of /sync/inc
Modified Files:
Branch:
class.so_sync.inc.php
date: 2004/07/06 10:11:40; author: mleonhardt; state: Exp; lines: +54 -1
Log Message:
- removed unused deleteClientMappings function
- documentation
- extended conflicthandling-ui
=====================================================================
Index: sync/inc/class.so_sync.inc.php
diff -u sync/inc/class.so_sync.inc.php:1.47 sync/inc/class.so_sync.inc.php:1.48
--- sync/inc/class.so_sync.inc.php:1.47 Thu Jul 1 08:46:44 2004
+++ sync/inc/class.so_sync.inc.php Tue Jul 6 10:11:40 2004
@@ -278,6 +278,59 @@
return $conflictlist;
}
+ /**
+ * Get one conflict of a given conflictid
+ *
+ * @param integer $deviceid unique device ID for internal devices database
+ * @param string $source Source name from device (e.g. 'contacts')
+ * @param integer $conflictid unique conflict ID of table
phpgw_syncconflicts
+ * @return array $conflict array(<br>'conflictid' => x, <br>'channelid' =>
x,
+ * <br>'luid' => x, <br>'ldata' => x, <br>'timestamp' => x<br>)
+ */
+
+ function GetConflict($deviceid, $source, $conflictid)
+ {
+ $GLOBALS['phpgw']->db->query(
+ 'SELECT conflictid, conflicts.channelid, luid, ldata, timestamp ' .
+ 'FROM phpgw_syncsources as ss, phpgw_syncchannels as sc, ' .
+ 'phpgw_syncconflicts as conflicts ' .
+ "WHERE ss.uri='$source' and " .
+ "sc.deviceid='$deviceid' and " .
+ "conflicts.conflictid = $conflictid and " .
+ 'sc.sourceid = ss.sourceid and ' .
+ 'sc.channelid = conflicts.channelid',
+ __LINE__,__FILE__);
+ if ($GLOBALS['phpgw']->db->next_record())
+ {
+ return array(
+ $GLOBALS['phpgw']->db->f('conflictid'),
+ $GLOBALS['phpgw']->db->f('channelid'),
+ $GLOBALS['phpgw']->db->f('luid'),
+ $GLOBALS['phpgw']->db->f('ldata'),
+ $GLOBALS['phpgw']->db->f('timestamp'));
+ } else
+ return array();
+ }
+
+ /**
+ * Delete a solved conflict of a given conflictid
+ *
+ * @param integer $deviceid unique device ID for internal devices database
+ * @param string $source Source name from device (e.g. 'contacts')
+ * @param integer $conflictid unique conflict ID of table
phpgw_syncconflicts
+ * @return integer $conflictid if succesful deleted, -1 in case of error
+ */
+
+ function DeleteConflict($deviceid, $source, $conflictid)
+ {
+ $id = $GLOBALS['phpgw']->db->query("DELETE FROM phpgw_syncconflicts
WHERE conflictid='".$conflictid."'",__LINE__,__FILE__);
+ if (isset($id))
+ {
+ return $conflictid;
+ }
+ return -1;
+ }
+
/******************************************************************/
/** functions for phpgw_syncsources *******************************/
/******************************************************************/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] sync/inc/class.so_sync.inc.php, 1.48,
nomail <=