[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.22
From: |
nomail |
Subject: |
[Phpgroupware-cvs] sync/inc/class.ipc_sync.inc.php, 1.22 |
Date: |
Wed, 9 Jun 2004 15:15:52 +0200 |
Update of /sync/inc
Modified Files:
Branch:
class.ipc_sync.inc.php
date: 2004/06/09 13:15:52; author: mleonhardt; state: Exp; lines: +37 -5
Log Message:
- bulk setsyncitems now working
=====================================================================
Index: sync/inc/class.ipc_sync.inc.php
diff -u sync/inc/class.ipc_sync.inc.php:1.21
sync/inc/class.ipc_sync.inc.php:1.22
--- sync/inc/class.ipc_sync.inc.php:1.21 Mon Jun 7 15:56:52 2004
+++ sync/inc/class.ipc_sync.inc.php Wed Jun 9 13:15:52 2004
@@ -213,17 +213,46 @@
{
// distinguish between encoded data from XML-RPC and data from internal
classes
if (is_array($Itemdata)) {
- error_log("setSyncItem: $deviceid, $source, $LUID, $mimetype |" .
serialize($Itemdata));
+ if ($this->debug)
+ error_log("setSyncItem: $deviceid, $source, $LUID, $mimetype |" .
serialize($Itemdata));
return $this->bo->setSyncItem($deviceid, $source, $LUID, $mimetype,
$Itemdata);
} else
{
- error_log("setSyncItem: $deviceid, $source, $LUID, $mimetype |" .
base64_decode($Itemdata));
+ if ($this->debug)
+ error_log("setSyncItem: $deviceid, $source, $LUID, $mimetype |" .
base64_decode($Itemdata));
return $this->bo->setSyncItem($deviceid, $source, $LUID, $mimetype,
base64_decode($Itemdata));
}
}
}
/**
+ * TODO: docu
+ */
+
+ function setSyncItems($deviceid, $source, $mimetype, $version, $count,
$Items) {
+ if ($this->debug)
+ error_log("setSyncItems: $deviceid, $source, $mimetype, $version,
$count, Items");
+
+ $result = array();
+ $fieldcount = 2;
+ for ($i = 0; $i < $count; $i++)
+ {
+ $arraypointer = $i * $fieldcount;
+ array_push($result,
+ $this->setSyncItem(
+ $deviceid,
+ $source,
+ $Items[$arraypointer], // LUID
+ $mimetype,
+// $version,
+ $Items[$arraypointer+1] // Data
+ )
+ );
+ }
+ return $result;
+ }
+
+ /**
* get all SyncItemIDs of this source (slow sync)
*
* @param integer $deviceid is the deviceid of the device which whant to
@@ -481,12 +510,15 @@
* //Tdodo: !! add documentation
*
*/
- function setPrefSourceInfo($deviceuri, $storeinfo)
+ function setPrefSourceInfo($deviceuri, $sourceinfo)
{
if ($this->debug)
{
- error_log("setPrefSourceInfo($deviceuri, " . serialize($storeinfo));
+ error_log("setPrefSourceInfo($deviceuri, " . serialize($sourceinfo));
}
+ $data = array('sync_actualsourceinfo' => $sourceinfo);
+ $GLOBALS['phpgw']->session->appsession('session_data','sync', $data);
+
return 1;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] sync/inc/class.ipc_sync.inc.php, 1.22,
nomail <=