gunnar: server/patches/horde-webmail/1.2.0/tg t_SyncML_UV_RecurringEventsWeekCount.diff, NONE, 1.1.2.1 series, 1.5.2.13, 1.5.2.14
cvs at kolab.org
cvs at kolab.org
Tue Nov 24 16:06:01 CET 2009
Author: gunnar
Update of /kolabrepository/server/patches/horde-webmail/1.2.0/tg
In directory doto:/tmp/cvs-serv8323/patches/horde-webmail/1.2.0/tg
Modified Files:
Tag: kolab_2_2_branch
series
Added Files:
Tag: kolab_2_2_branch
t_SyncML_UV_RecurringEventsWeekCount.diff
Log Message:
kolab/issue3894 (kronolith writes recurrent event data non-conformant to vCal (1.0) standard)
--- 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>
---
horde-webmail/kronolith/lib/Recurrence.php | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/horde-webmail/kronolith/lib/Recurrence.php b/horde-webmail/kronolith/lib/Recurrence.php
index 5aa5960..acbbee7 100644
--- a/horde-webmail/kronolith/lib/Recurrence.php
+++ b/horde-webmail/kronolith/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/patches/horde-webmail/1.2.0/tg/Attic/series,v
retrieving revision 1.5.2.13
retrieving revision 1.5.2.14
diff -u -d -r1.5.2.13 -r1.5.2.14
--- series 24 Nov 2009 09:51:13 -0000 1.5.2.13
+++ series 24 Nov 2009 15:05:59 -0000 1.5.2.14
@@ -78,4 +78,5 @@
t_framework_H_JS_Form_FixFormSecurityForImageUploads.diff -p1
t_kronolith_HK_GW_HandleEmptyDates.diff -p1
t_SyncML_HK_GW_DoubleSyncFix.diff -p1
-t_SyncML_UV_message_size_p1i.diff -p1
\ No newline at end of file
+t_SyncML_UV_message_size_p1i.diff -p1
+t_SyncML_UV_RecurringEventsWeekCount.diff -p1
\ No newline at end of file
More information about the commits
mailing list