gunnar: server/kolab-webclient/kronolith/patches/kronolith-2.3.3 t_SyncML_UV_RecurringEventsWeekCount.diff, NONE, 1.1 series, 1.5, 1.6
cvs at kolab.org
cvs at kolab.org
Sat Jan 23 00:23:54 CET 2010
Author: gunnar
Update of /kolabrepository/server/kolab-webclient/kronolith/patches/kronolith-2.3.3
In directory doto:/tmp/cvs-serv25207/kolab-webclient/kronolith/patches/kronolith-2.3.3
Modified Files:
series
Added Files:
t_SyncML_UV_RecurringEventsWeekCount.diff
Log Message:
MFB: kolab/issue3892, Added patch for kolab/issue3894 though not merged yet (conflict).
--- NEW FILE: t_SyncML_UV_RecurringEventsWeekCount.diff ---
From: root <Gunnar Wrobel wrobel at pardus.de>
Subject: [PATCH] t/SyncML/UV/RecurringEventsWeekCount
The attached patch fixes two Bugs in the SyncML code that affect the same
function. The Patch for A) only changes one line.
A) SyncML sends end dates not as DateTime, causing BB SyncJE to drop events
B) For recurring events SyncML sends number of incedences in vCal duration
instead of the number of weeks.
REF: https://issues.kolab.org/issue3894
Signed-off-by: root <Gunnar Wrobel wrobel at pardus.de>
---
lib/Recurrence.php | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/lib/Recurrence.php b/lib/Recurrence.php
index 5aa5960..acbbee7 100644
--- a/lib/Recurrence.php
+++ b/lib/Recurrence.php
@@ -944,6 +944,7 @@ class Horde_Date_Recurrence {
*/
function toRRule10($calendar)
{
+ $rec_days_per_week = 0;
switch ($this->recurType) {
case HORDE_DATE_RECUR_NONE:
return '';
@@ -959,6 +960,7 @@ class Horde_Date_Recurrence {
for ($i = 0; $i <= 7 ; ++$i) {
if ($this->recurOnDay(pow(2, $i))) {
$rrule .= ' ' . $vcaldays[$i];
+ $rec_days_per_week++;
}
}
break;
@@ -997,9 +999,18 @@ class Horde_Date_Recurrence {
return '';
}
- return $this->hasRecurEnd() ?
- $rrule . ' ' . $calendar->_exportDate($this->recurEnd) :
- $rrule . ' #' . (int)$this->getRecurCount();
+ if ( $this->hasRecurEnd() ) {
+ $rrule .= ' ' . $calendar->_exportDateTime($this->recurEnd);
+ } else {
+ if ($rec_days_per_week > 1) {
+ $rec_weeks= (int)floor((int)$this->getRecurCount() / $rec_days_per_week);
+ $rrule .= ' #' . $rec_weeks;
+ } else {
+ $rrule .= ' #' . (int)$this->getRecurCount();
+ }
+ }
+
+ return $rrule;
}
/**
--
tg: (29677b1..) t/SyncML/UV/RecurringEventsWeekCount (depends on: t/SyncML/UV/message/size/p1i)
--
TOPGIT patch commit log
=======================
commit c454efe2987e3f5e735247bffc16e40b282672dc
Author: root <Gunnar Wrobel wrobel at pardus.de>
Date: Tue Nov 24 15:46:04 2009 +0100
kolab/issue3894 (kronolith writes recurrent event data non-conformant to vCal (1.0) standard)
Index: series
===================================================================
RCS file: /kolabrepository/server/kolab-webclient/kronolith/patches/kronolith-2.3.3/series,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- series 22 Jan 2010 19:59:49 -0000 1.5
+++ series 22 Jan 2010 23:23:52 -0000 1.6
@@ -8,3 +8,4 @@
t_kronolith_HK_GW_ExportEventList.diff
t_kronolith_HK_GW_HandleEmptyDates.diff
t_kronolith_HK_UV_dateInputFieldOrder.diff
+
More information about the commits
mailing list