Monotone-Parent: 9f3f242b60f7db4066eb1a89daef0286cf6907af

Monotone-Revision: 5335af27b0e9d71da6cdc33a28be0e109f79c8b2

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-12-09T18:23:35
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2008-12-09 18:23:35 +00:00
parent 1d829010e7
commit 742e7fd936

View File

@@ -720,7 +720,7 @@
if (uid)
{
// We check if we must send an invitation update
// rather than just a normal invitation
// rather than just a normal invitation.
NSString *iCalString;
SOGoAppointmentObject *oldEventObject;
@@ -736,6 +736,7 @@
iCalEventChanges *changes;
NSArray *occurences;
NSCalendarDate *recurrenceId, *currentId;
NSString *recurrenceTime;
unsigned int i;
calendar = [oldEventObject calendar: NO secure: NO];
@@ -745,9 +746,9 @@
else
{
// If recurrenceId is defined, find the specified occurence
// within the repeating vEvent and replace it.
// within the repeating vEvent and remove it.
occurences = [calendar events];
for (i = 1; i< [occurences count]; i++)
for (i = 1; i < [occurences count]; i++)
{
currentOccurence = [occurences objectAtIndex: i];
currentId = [currentOccurence recurrenceId];
@@ -758,6 +759,14 @@
break;
}
}
if (oldEvent == nil)
{
// If no occurence found, create one.
recurrenceTime = [NSString stringWithFormat: @"%f", [recurrenceId timeIntervalSince1970]];
oldEvent = [oldEventObject newOccurenceWithID: recurrenceTime];
}
// Add the event as a new occurrence, without the organizer.
[newEvent setOrganizer: nil];
[calendar addChild: newEvent];