Fix issue with adding new entries from device

This commit is contained in:
Jörg Lehrke 2009-09-28 19:45:35 +00:00
parent 7eed120731
commit b1a9d0f546

View File

@ -311,7 +311,11 @@ class Horde_SyncML_Sync_TwoWaySync extends Horde_SyncML_Sync {
return $currentCmdID; return $currentCmdID;
} }
$guid_ts = $state->getSyncTSforAction($guid, 'modify'); // first we try the modification timestamp then the creation ts
if (!($guid_ts = $state->getSyncTSforAction($guid, 'modify'))) {
$guid_ts = $state->getSyncTSforAction($guid, 'add');
}
$sync_ts = $state->getChangeTS($syncType, $guid); $sync_ts = $state->getChangeTS($syncType, $guid);
Horde :: logMessage("SyncML: timestamp add $guid guid_ts: $guid_ts sync_ts: $sync_ts", __FILE__, __LINE__, PEAR_LOG_DEBUG); Horde :: logMessage("SyncML: timestamp add $guid guid_ts: $guid_ts sync_ts: $sync_ts", __FILE__, __LINE__, PEAR_LOG_DEBUG);
if ($sync_ts && $sync_ts == $guid_ts) { if ($sync_ts && $sync_ts == $guid_ts) {