Index: horde-webmailer/debian/horde-webmailer/usr/share/horde3/lib/SyncML/Backend/Horde.php =================================================================== --- horde-webmailer.orig/debian/horde-webmailer/usr/share/horde3/lib/SyncML/Backend/Horde.php 2008-10-20 16:28:27.000000000 +0200 +++ horde-webmailer/debian/horde-webmailer/usr/share/horde3/lib/SyncML/Backend/Horde.php 2008-10-20 16:32:09.000000000 +0200 @@ -178,7 +178,12 @@ foreach ($data as $suid) { // Only server needs to check for client sent entries: if ($this->_backendMode == SYNCML_BACKENDMODE_SERVER) { - if ($slowsync) { + // Add should only be done once on an existing entry - + // if it's performed a second time it's very likely that + // there is something wrong. Therefore all adds are + // filtered that already have a corresponding mapping in + // the database + //if ($slowsync) { // SlowSync: Ignore all entries where there already in a // map entry. $cuid = $this->_getCuid($database, $suid); @@ -188,7 +193,7 @@ __FILE__, __LINE__, PEAR_LOG_DEBUG); continue; } - } + //} $suid_ts = $registry->call( $database . '/getActionTimestamp', array($suid, Index: horde-webmailer/debian/horde-webmailer/usr/share/horde3/lib/Horde/Kolab/IMAP.php =================================================================== --- horde-webmailer.orig/debian/horde-webmailer/usr/share/horde3/lib/Horde/Kolab/IMAP.php 2008-10-20 16:27:27.000000000 +0200 +++ horde-webmailer/debian/horde-webmailer/usr/share/horde3/lib/Horde/Kolab/IMAP.php 2008-10-20 16:38:34.000000000 +0200 @@ -820,7 +820,17 @@ $this->updateHistory($object['uid'], $mod_ts, 'modify'); $modified[] = $object['uid']; } else { - $this->updateHistory($object['uid'], $mod_ts, 'add'); + // entries that should be added to the history MUST not + // have an existing entry in the history!! otherwise + // they are just marked as "modified" + $history = &Horde_History::singleton(); + $history_id = $this->_app_consts['application'] . ':' + . $this->_share_uid . ':' . $object_uid; + if ($history->getActionTimestamp ($history_id, 'add') != 0) { + $this->updateHistory($object['uid'], $mod_ts, 'add'); + } else { + $this->updateHistory($object['uid'], $mod_ts, 'modify'); + } } } else { $this->_ignoreUid($imap_uid);