Calendar special pseudo recurrence exception handling moved to SyncML code

- content type is now available in replace method
  - pseudo to real exception propagation does now work within a single session
This commit is contained in:
Jörg Lehrke 2009-09-23 19:20:15 +00:00
parent dae19a0bfa
commit 217f0de233
2 changed files with 4 additions and 4 deletions

View File

@ -176,13 +176,13 @@ class Horde_SyncML_Sync {
$locName = $state->getLocName(); $locName = $state->getLocName();
$sourceURI = $state->getSourceURI(); $sourceURI = $state->getSourceURI();
$hordeType = $state->getHordeType($type); $hordeType = $state->getHordeType($type);
$refts = $state->getServerAnchorLast($type); $serverAnchorLast = $state->getServerAnchorLast($type);
$state->setTargetURI($type); $state->setTargetURI($type);
$changes = array(); $changes = array();
// First we get all changes done after the previous sync start // First we get all changes done after the previous sync start
foreach ($registry->call($hordeType. '/listBy', foreach ($registry->call($hordeType. '/listBy',
array('action' => 'modify', array('action' => 'modify',
'timestamp' => $refts, 'timestamp' => $serverAnchorLast,
'type' => $type, 'type' => $type,
'filter' => $this->_filterExpression)) as $change) { 'filter' => $this->_filterExpression)) as $change) {
// now we have to remove the ones // now we have to remove the ones
@ -386,7 +386,7 @@ class Horde_SyncML_Sync {
// Entry exists: replace/merge with current one. // Entry exists: replace/merge with current one.
$ok = $registry->call($hordeType . '/replace', $ok = $registry->call($hordeType . '/replace',
array($guid, $state->convertClient2Server($syncItem->getContent(), array($guid, $state->convertClient2Server($syncItem->getContent(),
$contentType), $contentType, $merge)); $contentType), $contentType, $type, $merge));
if (!is_a($ok, 'PEAR_Error') && $ok != false) if (!is_a($ok, 'PEAR_Error') && $ok != false)
{ {
$ts = $state->getSyncTSforAction($guid, 'modify'); $ts = $state->getSyncTSforAction($guid, 'modify');

View File

@ -311,7 +311,7 @@ class Horde_SyncML_Sync_TwoWaySync extends Horde_SyncML_Sync {
return $currentCmdID; return $currentCmdID;
} }
$guid_ts = $state->getSyncTSforAction($guid, 'add'); $guid_ts = $state->getSyncTSforAction($guid, 'modify');
$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) {