address moreData conflict between datastores

This commit is contained in:
Jörg Lehrke 2010-02-09 10:48:03 +00:00
parent 68fcd4da93
commit c9581b47a9
4 changed files with 25 additions and 2 deletions

View File

@ -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);
}
}

View File

@ -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');

View File

@ -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');

View File

@ -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');