SlowSync issues with event pseudo exceptions

This commit is contained in:
Jörg Lehrke 2010-03-03 00:41:15 +00:00
parent 30ce07e567
commit 59f91abfd7
2 changed files with 5 additions and 12 deletions

View File

@ -546,13 +546,10 @@ class EGW_SyncML_State extends Horde_SyncML_State
'map_id' => $mapID, 'map_id' => $mapID,
'map_locuid' => $locid, 'map_locuid' => $locid,
); );
$data = array (
'map_expired' => true,
);
$GLOBALS['egw']->db->delete('egw_contentmap', $where, $GLOBALS['egw']->db->delete('egw_contentmap', $where,
__LINE__, __FILE__, 'syncml'); __LINE__, __FILE__, 'syncml');
// delete all egw id's // delete all EGw id's
$where = array( $where = array(
'map_id' => $mapID, 'map_id' => $mapID,
'map_guid' => $guid, 'map_guid' => $guid,

View File

@ -86,7 +86,7 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync {
return $currentCmdID; 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)", Horde::logMessage("SyncML: slowsync add to client: $guid ignored, already at client($locID)",
__FILE__, __LINE__, PEAR_LOG_DEBUG); __FILE__, __LINE__, PEAR_LOG_DEBUG);
continue; continue;
@ -266,7 +266,7 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync {
Horde::logMessage('SyncML: adding mapping for locuri:' Horde::logMessage('SyncML: adding mapping for locuri:'
. $syncItem->getLocURI() . ' and guid:' . $guid, . $syncItem->getLocURI() . ' and guid:' . $guid,
__FILE__, __LINE__, PEAR_LOG_DEBUG); __FILE__, __LINE__, PEAR_LOG_DEBUG);
$state->setUID($type, $syncItem->getLocURI(), $guid, mktime()); $state->setUID($type, $syncItem->getLocURI(), $guid);
$state->log("Client-Map"); $state->log("Client-Map");
continue; continue;
} }
@ -294,13 +294,9 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync {
$guid = $registry->call($hordeType . '/import', $guid = $registry->call($hordeType . '/import',
array($state->convertClient2Server($syncItem->getContent(), $contentType), $contentType)); array($state->convertClient2Server($syncItem->getContent(), $contentType), $contentType));
if (!is_a($guid, 'PEAR_Error') && $guid != false) { if (!is_a($guid, 'PEAR_Error') && $guid != false) {
$ts = $state->getSyncTSforAction($guid, 'modify'); $state->setUID($type, $syncItem->getLocURI(), $guid);
if (!$ts) {
$ts = $state->getSyncTSforAction($guid, 'add');
}
$state->setUID($type, $syncItem->getLocURI(), $guid, $ts);
$state->log("Client-AddReplace"); $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); __FILE__, __LINE__, PEAR_LOG_DEBUG);
} else { } else {
Horde::logMessage('SyncML: Error in replacing/add client entry:' . $guid->message, Horde::logMessage('SyncML: Error in replacing/add client entry:' . $guid->message,