mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-01 10:59:35 +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_id' => $mapID,
|
||||||
'map_locuid' => $locid,
|
'map_locuid' => $locid,
|
||||||
);
|
);
|
||||||
$data = array (
|
|
||||||
'map_expired' => true,
|
|
||||||
);
|
|
||||||
$GLOBALS['egw']->db->delete('egw_contentmap', $where,
|
$GLOBALS['egw']->db->delete('egw_contentmap', $where,
|
||||||
__LINE__, __FILE__, 'syncml');
|
__LINE__, __FILE__, 'syncml');
|
||||||
|
|
||||||
// delete all egw id's
|
// delete all EGw id's
|
||||||
$where = array(
|
$where = array(
|
||||||
'map_id' => $mapID,
|
'map_id' => $mapID,
|
||||||
'map_guid' => $guid,
|
'map_guid' => $guid,
|
||||||
|
@ -86,7 +86,7 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync {
|
|||||||
return $currentCmdID;
|
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)",
|
Horde::logMessage("SyncML: slowsync add to client: $guid ignored, already at client($locID)",
|
||||||
__FILE__, __LINE__, PEAR_LOG_DEBUG);
|
__FILE__, __LINE__, PEAR_LOG_DEBUG);
|
||||||
continue;
|
continue;
|
||||||
@ -266,7 +266,7 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync {
|
|||||||
Horde::logMessage('SyncML: adding mapping for locuri:'
|
Horde::logMessage('SyncML: adding mapping for locuri:'
|
||||||
. $syncItem->getLocURI() . ' and guid:' . $guid,
|
. $syncItem->getLocURI() . ' and guid:' . $guid,
|
||||||
__FILE__, __LINE__, PEAR_LOG_DEBUG);
|
__FILE__, __LINE__, PEAR_LOG_DEBUG);
|
||||||
$state->setUID($type, $syncItem->getLocURI(), $guid, mktime());
|
$state->setUID($type, $syncItem->getLocURI(), $guid);
|
||||||
$state->log("Client-Map");
|
$state->log("Client-Map");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -294,13 +294,9 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync {
|
|||||||
$guid = $registry->call($hordeType . '/import',
|
$guid = $registry->call($hordeType . '/import',
|
||||||
array($state->convertClient2Server($syncItem->getContent(), $contentType), $contentType));
|
array($state->convertClient2Server($syncItem->getContent(), $contentType), $contentType));
|
||||||
if (!is_a($guid, 'PEAR_Error') && $guid != false) {
|
if (!is_a($guid, 'PEAR_Error') && $guid != false) {
|
||||||
$ts = $state->getSyncTSforAction($guid, 'modify');
|
$state->setUID($type, $syncItem->getLocURI(), $guid);
|
||||||
if (!$ts) {
|
|
||||||
$ts = $state->getSyncTSforAction($guid, 'add');
|
|
||||||
}
|
|
||||||
$state->setUID($type, $syncItem->getLocURI(), $guid, $ts);
|
|
||||||
$state->log("Client-AddReplace");
|
$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);
|
__FILE__, __LINE__, PEAR_LOG_DEBUG);
|
||||||
} else {
|
} else {
|
||||||
Horde::logMessage('SyncML: Error in replacing/add client entry:' . $guid->message,
|
Horde::logMessage('SyncML: Error in replacing/add client entry:' . $guid->message,
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
* @author Mike Cochrane <mike@graftonhall.co.nz>
|
* @author Mike Cochrane <mike@graftonhall.co.nz>
|
||||||
* @since Horde 3.0
|
* @since Horde 3.0
|
||||||
* @package Horde_iCalendar
|
* @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 {
|
class Horde_iCalendar_vtimezone extends Horde_iCalendar {
|
||||||
|
|
||||||
@ -54,6 +55,20 @@ class Horde_iCalendar_vtimezone extends Horde_iCalendar {
|
|||||||
return false;
|
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');
|
$rrules = $child->getAttribute('RRULE');
|
||||||
if (is_a($rrules, 'PEAR_Error')) {
|
if (is_a($rrules, 'PEAR_Error')) {
|
||||||
if (!is_int($switch_time)) {
|
if (!is_int($switch_time)) {
|
||||||
@ -68,7 +83,7 @@ class Horde_iCalendar_vtimezone extends Horde_iCalendar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$switch_year = date("Y", $switch_time);
|
$switch_year = date("Y", $switch_time);
|
||||||
if ( $switch_year > $year ) {
|
if ($switch_year > $year) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user