[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.35
From: |
nomail |
Subject: |
[Phpgroupware-cvs] sync/inc/class.so_sync.inc.php, 1.35 |
Date: |
Sun, 23 May 2004 02:55:51 -0000 |
Update of /sync/inc
Modified Files:
Branch:
class.so_sync.inc.php
date: 2004/05/03 13:07:53; author: mkaemmerer; state: Exp; lines: +24 -5
Log Message:
- added DeleteMappings
- implemented resetChannelToFullSync
=====================================================================
Index: sync/inc/class.so_sync.inc.php
diff -u sync/inc/class.so_sync.inc.php:1.34 sync/inc/class.so_sync.inc.php:1.35
--- sync/inc/class.so_sync.inc.php:1.34 Mon May 3 08:55:40 2004
+++ sync/inc/class.so_sync.inc.php Mon May 3 13:07:53 2004
@@ -706,6 +706,19 @@
}
/**
+ * Delete all mappings referenced by channelid
+ *
+ * @param integer channelid
+ * @return boolean true if successfull, false in case of error
+ */
+
+ function DeleteMappings($channelid)
+ {
+ $GLOBALS['phpgw']->db->query("DELETE FROM phpgw_syncmapping WHERE
channelid='$channelid'",__LINE__,__FILE__);
+ return !($GLOBALS['phpgw']->db->Error);
+ }
+
+ /**
* set the device description of the device with $deviceid (has to exist in
the db yet)
*
* @param integer $deviceid unique device ID for internal devices database
@@ -732,10 +745,16 @@
function resetChanneltoFullsync($deviceid, $source)
{
-// $GLOBALS['phpgw']->db->query("UPDATE phpgw_syncdevices SET
description='$newdescription' " .
-// " WHERE
deviceid='$deviceid'",__LINE__,__FILE__);
-// return !($GLOBALS['phpgw']->db->Error);
- return true;
+ $res = SetTimestamp($deviceid, $source, '', '', '');
+ if ($res >= 0)
+ {
+ if ($chanelid = GetChannelIDfromSourceAndDeviceID($deviceid, $source)
>= 0 )
+ {
+ return DeleteMappings($channelid);
+ } else
+ return $channelid;
+ } else
+ return $res;
}
}
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] sync/inc/class.so_sync.inc.php, 1.35,
nomail <=