From 59f91abfd798f1f3c16cd21fd4293093a6dddc5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Lehrke?= Date: Wed, 3 Mar 2010 00:41:15 +0000 Subject: [PATCH] SlowSync issues with event pseudo exceptions --- phpgwapi/inc/horde/Horde/SyncML/State_egw.php | 5 +---- phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php | 12 ++++-------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/phpgwapi/inc/horde/Horde/SyncML/State_egw.php b/phpgwapi/inc/horde/Horde/SyncML/State_egw.php index 2928b5a2b6..a3daf0aa12 100644 --- a/phpgwapi/inc/horde/Horde/SyncML/State_egw.php +++ b/phpgwapi/inc/horde/Horde/SyncML/State_egw.php @@ -546,13 +546,10 @@ class EGW_SyncML_State extends Horde_SyncML_State 'map_id' => $mapID, 'map_locuid' => $locid, ); - $data = array ( - 'map_expired' => true, - ); $GLOBALS['egw']->db->delete('egw_contentmap', $where, __LINE__, __FILE__, 'syncml'); - // delete all egw id's + // delete all EGw id's $where = array( 'map_id' => $mapID, 'map_guid' => $guid, diff --git a/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php b/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php index f7a96e5a50..44f4ae01cd 100644 --- a/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php +++ b/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php @@ -86,7 +86,7 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync { return $currentCmdID; } - if ($locID = $state->getLocID($syncType, $guid)) { + if (($locID = $state->getLocID($syncType, $guid))) { Horde::logMessage("SyncML: slowsync add to client: $guid ignored, already at client($locID)", __FILE__, __LINE__, PEAR_LOG_DEBUG); continue; @@ -266,7 +266,7 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync { Horde::logMessage('SyncML: adding mapping for locuri:' . $syncItem->getLocURI() . ' and guid:' . $guid, __FILE__, __LINE__, PEAR_LOG_DEBUG); - $state->setUID($type, $syncItem->getLocURI(), $guid, mktime()); + $state->setUID($type, $syncItem->getLocURI(), $guid); $state->log("Client-Map"); continue; } @@ -294,13 +294,9 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync { $guid = $registry->call($hordeType . '/import', array($state->convertClient2Server($syncItem->getContent(), $contentType), $contentType)); if (!is_a($guid, 'PEAR_Error') && $guid != false) { - $ts = $state->getSyncTSforAction($guid, 'modify'); - if (!$ts) { - $ts = $state->getSyncTSforAction($guid, 'add'); - } - $state->setUID($type, $syncItem->getLocURI(), $guid, $ts); + $state->setUID($type, $syncItem->getLocURI(), $guid); $state->log("Client-AddReplace"); - Horde::logMessage('SyncML: r/ added client entry as ' . $guid, + Horde::logMessage('SyncML: replaced/added client entry as ' . $guid, __FILE__, __LINE__, PEAR_LOG_DEBUG); } else { Horde::logMessage('SyncML: Error in replacing/add client entry:' . $guid->message,