diff --git a/phpgwapi/inc/horde/Horde/SyncML/State_egw.php b/phpgwapi/inc/horde/Horde/SyncML/State_egw.php index 2928b5a2b6..a3daf0aa12 100644 --- a/phpgwapi/inc/horde/Horde/SyncML/State_egw.php +++ b/phpgwapi/inc/horde/Horde/SyncML/State_egw.php @@ -546,13 +546,10 @@ class EGW_SyncML_State extends Horde_SyncML_State 'map_id' => $mapID, 'map_locuid' => $locid, ); - $data = array ( - 'map_expired' => true, - ); $GLOBALS['egw']->db->delete('egw_contentmap', $where, __LINE__, __FILE__, 'syncml'); - // delete all egw id's + // delete all EGw id's $where = array( 'map_id' => $mapID, 'map_guid' => $guid, diff --git a/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php b/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php index f7a96e5a50..44f4ae01cd 100644 --- a/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php +++ b/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php @@ -86,7 +86,7 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync { return $currentCmdID; } - if ($locID = $state->getLocID($syncType, $guid)) { + if (($locID = $state->getLocID($syncType, $guid))) { Horde::logMessage("SyncML: slowsync add to client: $guid ignored, already at client($locID)", __FILE__, __LINE__, PEAR_LOG_DEBUG); continue; @@ -266,7 +266,7 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync { Horde::logMessage('SyncML: adding mapping for locuri:' . $syncItem->getLocURI() . ' and guid:' . $guid, __FILE__, __LINE__, PEAR_LOG_DEBUG); - $state->setUID($type, $syncItem->getLocURI(), $guid, mktime()); + $state->setUID($type, $syncItem->getLocURI(), $guid); $state->log("Client-Map"); continue; } @@ -294,13 +294,9 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync { $guid = $registry->call($hordeType . '/import', array($state->convertClient2Server($syncItem->getContent(), $contentType), $contentType)); if (!is_a($guid, 'PEAR_Error') && $guid != false) { - $ts = $state->getSyncTSforAction($guid, 'modify'); - if (!$ts) { - $ts = $state->getSyncTSforAction($guid, 'add'); - } - $state->setUID($type, $syncItem->getLocURI(), $guid, $ts); + $state->setUID($type, $syncItem->getLocURI(), $guid); $state->log("Client-AddReplace"); - Horde::logMessage('SyncML: r/ added client entry as ' . $guid, + Horde::logMessage('SyncML: replaced/added client entry as ' . $guid, __FILE__, __LINE__, PEAR_LOG_DEBUG); } else { Horde::logMessage('SyncML: Error in replacing/add client entry:' . $guid->message, diff --git a/phpgwapi/inc/horde/Horde/iCalendar/vtimezone.php b/phpgwapi/inc/horde/Horde/iCalendar/vtimezone.php index e07bd2db2d..197e0b30f5 100644 --- a/phpgwapi/inc/horde/Horde/iCalendar/vtimezone.php +++ b/phpgwapi/inc/horde/Horde/iCalendar/vtimezone.php @@ -12,6 +12,7 @@ * @author Mike Cochrane * @since Horde 3.0 * @package Horde_iCalendar + * @changes 2010/02/26 Joerg Lehrke : Add RDATE support (for KDE 4.x) */ class Horde_iCalendar_vtimezone extends Horde_iCalendar { @@ -54,6 +55,20 @@ class Horde_iCalendar_vtimezone extends Horde_iCalendar { return false; } + $rdates = $child->getAttribute('RDATE'); + if (!is_a($rdates, 'PEAR_Error')) { + foreach ($rdates as $rdate) { + $switch_time = $switch_time['value']; + $switch_year = date("Y", $switch_time); + if ($switch_year == $year) { + $t = getdate($switch_time); + $result['time'] = @gmmktime($t['hours'], $t['minutes'], $t['seconds'], + $t['mon'], $t['mday'], $t['year']); + return $result; + } + } + } + $rrules = $child->getAttribute('RRULE'); if (is_a($rrules, 'PEAR_Error')) { if (!is_int($switch_time)) { @@ -68,7 +83,7 @@ class Horde_iCalendar_vtimezone extends Horde_iCalendar { } $switch_year = date("Y", $switch_time); - if ( $switch_year > $year ) { + if ($switch_year > $year) { return false; }