mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-28 19:03:14 +01:00
Enable SlowSync optimization with old mappings; vCalendar 1.0 folding
This commit is contained in:
parent
0f512b0a6b
commit
30a17bc476
@ -285,10 +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) {
|
||||
if (!$anchormatch) {
|
||||
// Erase existing map:
|
||||
$state->removeAllUID($this->_targetLocURI);
|
||||
#}
|
||||
}
|
||||
}
|
||||
// Now create the actual SyncML_Sync object, if it doesn't exist yet.
|
||||
$sync = &$state->getSync($this->_targetLocURI);
|
||||
|
@ -237,14 +237,16 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync {
|
||||
|
||||
$guid = false;
|
||||
|
||||
$oguid = $state->getGlobalUID($type, $syncItem->getLocURI());
|
||||
|
||||
$guid = $registry->call($hordeType . '/search',
|
||||
array($state->convertClient2Server($syncItem->getContent(), $contentType), $contentType, $state->getGlobalUID($type, $syncItem->getLocURI()), $type));
|
||||
array($state->convertClient2Server($syncItem->getContent(), $contentType), $contentType, $oguid, $type));
|
||||
|
||||
if ($guid) {
|
||||
// Check if the found entry came from the client
|
||||
$guid_ts = $state->getSyncTSforAction($guid, 'add');
|
||||
$sync_ts = $state->getChangeTS($type, $guid);
|
||||
if ($sync_ts && $sync_ts == $guid_ts) {
|
||||
if ($oguid != $guid && $sync_ts && $sync_ts == $guid_ts) {
|
||||
// Entry came from the client, so we get a duplicate here
|
||||
Horde::logMessage('SyncML: CONFLICT for locuri ' . $syncItem->getLocURI()
|
||||
. ' guid ' . $guid , __FILE__, __LINE__, PEAR_LOG_WARNING);
|
||||
|
@ -603,7 +603,11 @@ class Horde_iCalendar {
|
||||
// last=20line
|
||||
while (preg_match_all('/^([^:]+;\s*((ENCODING=)?QUOTED-PRINTABLE|ENCODING=[Q|q])(.*=\r?\n)+(.*[^=])?\r?\n)/mU', $vCal, $matches)) {
|
||||
foreach ($matches[1] as $s) {
|
||||
if ($this->isOldFormat()) {
|
||||
$r = preg_replace('/=\r?\n([ \t])/', '\1', $s);
|
||||
} else {
|
||||
$r = preg_replace('/=\r?\n[ \t]*/', '', $s);
|
||||
}
|
||||
$vCal = str_replace($s, $r, $vCal);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user