See ChangeLog

Monotone-Parent: 1da41bffe0d25476b6f909fd1621c5026cdf59ee
Monotone-Revision: ab9ae63478f08b1ff94c2872ca40ff73a041a9a7

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2009-03-23T21:19:55
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle committed 2009-03-23 21:19:55 +00:00
1 parent 8715ec448b
commit 71d4126149
6 files changed
+75 -20

No files matched your search

+25 -17
View File
@@ -173,24 +173,31 @@
{
SOGoAppointmentFolder *folder;
SOGoAppointmentObject *object;
NSArray *folders;
NSEnumerator *e;
NSString *possibleName;
#warning Should call lookupCalendarFoldersForUIDs to search among all folders
folder = [container lookupCalendarFolderForUID: uid];
object = [folder lookupName: nameInContainer
inContext: context acquire: NO];
if ([object isKindOfClass: [NSException class]])
object = nil;
folders = [container lookupCalendarFoldersForUID: uid];
e = [folders objectEnumerator];
while ( object == nil && (folder = [e nextObject]) )
{
possibleName = [folder resourceNameForEventUID: eventUID];
if (possibleName)
object = [folder lookupName: nameInContainer
inContext: context
acquire: NO];
if ([object isKindOfClass: [NSException class]])
{
object = [folder lookupName: possibleName
inContext: context acquire: NO];
if ([object isKindOfClass: [NSException class]])
possibleName = [folder resourceNameForEventUID: eventUID];
if (possibleName)
{
object = [folder lookupName: possibleName
inContext: context acquire: NO];
if ([object isKindOfClass: [NSException class]])
object = nil;
}
else
object = nil;
}
else
object = nil;
}
if (!object)
@@ -281,8 +288,9 @@
NSCalendarDate *currentId;
NSString *calendarContent;
int max, count;
#warning Should call lookupCalendarFoldersForUIDs to search among all folders
// Invitations are always written to the personal folder; it's not necessay
// to look into all folders of the user
folder = [container lookupCalendarFolderForUID: theUID];
object = [folder lookupName: nameInContainer
inContext: context acquire: NO];
@@ -293,7 +301,7 @@
else
{
calendar = [object calendar: NO secure: NO];
// If recurrenceId is defined, remove the occurence from
// the repeating event.
occurences = [calendar events];
@@ -314,9 +322,9 @@
// Add an date exception.
event = (iCalRepeatableEntityObject*)[calendar firstChildWithTag: [object componentTag]];
[event addToExceptionDates: recurrenceId];
[event increaseSequence];
// We generate the updated iCalendar file and we save it
// in the database.
calendarContent = [calendar versitString];