mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-20 21:08:54 +01:00
New SyncML base classes
This commit is contained in:
parent
94b15909a6
commit
86039be423
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -12,6 +12,7 @@
|
||||
* @author Mike Cochrane <mike@graftonhall.co.nz>
|
||||
* @since Horde 3.0
|
||||
* @package Horde_iCalendar
|
||||
* @changes 2010/02/26 Joerg Lehrke <jlehrke@noc.de>: 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user