oc-calendar: Fix weekly recurring events exported to Outlook from SOGo
SOGo does not create BYDAY mask in weekly recurrence, so we have to guess it from the start date's day of week. In other case, the event is not exported to Outlook and it says that is corrupted.pull/65/head
parent
6f44ec42c1
commit
fb4c3a4730
1
NEWS
1
NEWS
|
@ -5,6 +5,7 @@ Enhancements
|
||||||
- Improve sync speed from Outlook by non-reprocessing already downloaded unread mails
|
- Improve sync speed from Outlook by non-reprocessing already downloaded unread mails
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
|
- Weekly recurring events created in SOGo web interface are now shown in Outlook
|
||||||
- Fix exception modifications import in recurrence series
|
- Fix exception modifications import in recurrence series
|
||||||
- Sent mails are not longer in Drafts folder using Outlook
|
- Sent mails are not longer in Drafts folder using Outlook
|
||||||
- Fix server side crash parsing rtf emails with images (with word97 format)
|
- Fix server side crash parsing rtf emails with images (with word97 format)
|
||||||
|
|
|
@ -325,15 +325,25 @@
|
||||||
rp->RecurFrequency = RecurFrequency_Weekly;
|
rp->RecurFrequency = RecurFrequency_Weekly;
|
||||||
rp->PatternType = PatternType_Week;
|
rp->PatternType = PatternType_Week;
|
||||||
rp->Period = repeatInterval;
|
rp->Period = repeatInterval;
|
||||||
|
|
||||||
|
dayOfWeek = [startDate dayOfWeek];
|
||||||
|
|
||||||
mask = 0;
|
mask = 0;
|
||||||
byDayMask = [self byDayMask];
|
byDayMask = [self byDayMask];
|
||||||
|
if (byDayMask)
|
||||||
|
{
|
||||||
for (count = 0; count < 7; count++)
|
for (count = 0; count < 7; count++)
|
||||||
if ([byDayMask occursOnDay: count])
|
if ([byDayMask occursOnDay: count])
|
||||||
mask |= 1 << count;
|
mask |= 1 << count;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Set the recurrence pattern using start date */
|
||||||
|
mask |= 1 << dayOfWeek;
|
||||||
|
}
|
||||||
rp->PatternTypeSpecific.WeekRecurrencePattern = mask;
|
rp->PatternTypeSpecific.WeekRecurrencePattern = mask;
|
||||||
|
|
||||||
/* FirstDateTime */
|
/* FirstDateTime */
|
||||||
dayOfWeek = [startDate dayOfWeek];
|
|
||||||
if (dayOfWeek)
|
if (dayOfWeek)
|
||||||
beginOfWeek = [startDate dateByAddingYears: 0 months: 0
|
beginOfWeek = [startDate dateByAddingYears: 0 months: 0
|
||||||
days: -dayOfWeek
|
days: -dayOfWeek
|
||||||
|
|
Loading…
Reference in New Issue