[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] sync/inc/class.ipc_sync.inc.php, 1.21
From: |
nomail |
Subject: |
[Phpgroupware-cvs] sync/inc/class.ipc_sync.inc.php, 1.21 |
Date: |
Mon, 7 Jun 2004 17:56:52 +0200 |
Update of /sync/inc
Modified Files:
Branch:
class.ipc_sync.inc.php
date: 2004/06/07 15:56:52; author: mkaemmerer; state: Exp; lines: +19 -8
Log Message:
- improved log messages
- timestamp handling for addData/replaceData
=====================================================================
Index: sync/inc/class.ipc_sync.inc.php
diff -u sync/inc/class.ipc_sync.inc.php:1.20
sync/inc/class.ipc_sync.inc.php:1.21
--- sync/inc/class.ipc_sync.inc.php:1.20 Mon Jun 7 13:54:30 2004
+++ sync/inc/class.ipc_sync.inc.php Mon Jun 7 15:56:52 2004
@@ -258,12 +258,11 @@
set_time_limit(0);
-
$AllItems = array();
foreach($Ids as $iID) {
$AllItems[] = $this->getSyncItemFromId($deviceid, $source, $iID,
$mimetype);
}
- error_log("end of getSyncitemsByID: ". serialize($AllItems));
+
return $AllItems;
}
@@ -348,6 +347,7 @@
* @param integer $deviceid is the deviceid of the device which whant to
* do the sync
* @param string $source Source-URI of the source to sync
+ * @param string $timestamp Syncstart timestamp from Sync4j, used for all
addData/replaceData
* @return array hasharray (<br>
* "tag" => string time of last synchronisation, 0 in case of never
* (format: 20040416T172608Z)<br>
@@ -356,17 +356,28 @@
* )
*/
- function readLastTimestamp($deviceid, $source) {
+ function readLastTimestamp($deviceid, $source, $syncstart = 0) {
if ($this->debug)
- error_log("readLastTimestamp: $deviceid, $source");
-
+ error_log("readLastTimestamp: $deviceid, $source, $syncstart");
+
$timestamp = $this->so->GetTimestamp($deviceid, $source);
// return string because php doesn't handle long (don't want to use double)
$result["tag"] = (string) $timestamp[0];
$result["start"] = (string) $timestamp[1];
$result["end"] = (string) $timestamp[2];
+
+ if ($syncstart == 0)
+ {
+ $syncstart = time()-3;
+ } else
+ {
+ $syncstart = $syncstart -3;
+ }
+ $data = array('syncstart_timestamp' => $syncstart);
+ $GLOBALS['phpgw']->session->appsession('session_data','sync', $data);
+
return $result;
- }
+ }
/**
* save the timestamp of the last sync with this device
@@ -492,4 +503,4 @@
return 1;
}
}
-?>
\ No newline at end of file
+?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] sync/inc/class.ipc_sync.inc.php, 1.21,
nomail <=