diff --git a/phpgwapi/inc/horde/Horde/SyncML/Command/Alert.php b/phpgwapi/inc/horde/Horde/SyncML/Command/Alert.php index 85670dc277..89c2c0eac5 100644 --- a/phpgwapi/inc/horde/Horde/SyncML/Command/Alert.php +++ b/phpgwapi/inc/horde/Horde/SyncML/Command/Alert.php @@ -285,8 +285,10 @@ class Horde_SyncML_Command_Alert extends Horde_SyncML_Command { $synctype != ALERT_ONE_WAY_FROM_CLIENT && $synctype != ALERT_ONE_WAY_FROM_SERVER) { $serverAnchorLast = 0; - if (!$anchormatch) { - // Erase existing map: + if (isset($GLOBALS['egw_info']['user']['preferences']['syncml']['slowsync_ignore_map']) && + $GLOBALS['egw_info']['user']['preferences']['syncml']['slowsync_ignore_map'] + || !$anchormatch) { + // Erase existing map $state->removeAllUID($this->_targetLocURI); } } diff --git a/phpgwapi/inc/horde/Horde/SyncML/Sync/RefreshFromServerSync.php b/phpgwapi/inc/horde/Horde/SyncML/Sync/RefreshFromServerSync.php index 1575017f19..5a6a46cd89 100644 --- a/phpgwapi/inc/horde/Horde/SyncML/Sync/RefreshFromServerSync.php +++ b/phpgwapi/inc/horde/Horde/SyncML/Sync/RefreshFromServerSync.php @@ -39,6 +39,13 @@ class Horde_SyncML_Sync_RefreshFromServerSync extends Horde_SyncML_Sync_TwoWaySy if (isset($state->curSyncItem)) { // Finish the pending sync item $cmd = &$state->curSyncItem; + if (!is_a($cmd, 'Horde_SyncML_Command_Sync_ContentSyncElement')) { + // Conflict with other datastore + Horde :: logMessage("SyncML: handleSync($currentCmdID, $hordeType, $syncType) moreData conflict found", + __FILE__, __LINE__, PEAR_LOG_DEBUG); + $state->setSyncStatus(SERVER_SYNC_DATA_PENDING); + return $currentCmdID; + } unset($state->curSyncItem); $currentCmdID = $cmd->outputCommand($currentCmdID, $output, 'Sync'); diff --git a/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php b/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php index e698c58c99..f7a96e5a50 100644 --- a/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php +++ b/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php @@ -47,6 +47,13 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync { if (isset($state->curSyncItem)) { // Finish the pending sync item $cmd = &$state->curSyncItem; + if (!is_a($cmd, 'Horde_SyncML_Command_Sync_ContentSyncElement')) { + // Conflict with other datastore + Horde :: logMessage("SyncML: handleSync($currentCmdID, $hordeType, $syncType) moreData conflict found", + __FILE__, __LINE__, PEAR_LOG_DEBUG); + $state->setSyncStatus(SERVER_SYNC_DATA_PENDING); + return $currentCmdID; + } unset($state->curSyncItem); $currentCmdID = $cmd->outputCommand($currentCmdID, $output, 'Sync'); diff --git a/phpgwapi/inc/horde/Horde/SyncML/Sync/TwoWaySync.php b/phpgwapi/inc/horde/Horde/SyncML/Sync/TwoWaySync.php index 1e8eae1d8d..6ede36367c 100644 --- a/phpgwapi/inc/horde/Horde/SyncML/Sync/TwoWaySync.php +++ b/phpgwapi/inc/horde/Horde/SyncML/Sync/TwoWaySync.php @@ -62,6 +62,13 @@ class Horde_SyncML_Sync_TwoWaySync extends Horde_SyncML_Sync { if (isset ($state->curSyncItem)) { // Finish the pending sync item $cmd = & $state->curSyncItem; + if (!is_a($cmd, 'Horde_SyncML_Command_Sync_ContentSyncElement')) { + // Conflict with other datastore + Horde :: logMessage("SyncML: handleSync($currentCmdID, $hordeType, $syncType) moreData conflict found", + __FILE__, __LINE__, PEAR_LOG_DEBUG); + $state->setSyncStatus(SERVER_SYNC_DATA_PENDING); + return $currentCmdID; + } unset ($state->curSyncItem); $currentCmdID = $cmd->outputCommand($currentCmdID, $output, 'Sync');