diff --git a/ChangeLog b/ChangeLog index bc719d828..dfe5f1f99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2009-03-23 Francis Lachapelle + + * SoObjects/Appointments/SOGoAppointmentObject.m + ([SOGoAppointmentObject -_lookupEvent:forUID:]): when looking for + an event for a specific user, we now search into all the user's + calendar folders. + + * SoObjects/Appointments/SOGoAppointmentFolder.m + ([SOGoAppointmentFolder -lookupCalendarFoldersForUID:]): new + method that returns an array of a user's calendar folders + excluding the subscriptions. + 2009-03-23 Wolfgang Sourdeau * SoObjects/SOGo/SOGoGCSFolder.m ([SOGoGCSFolder @@ -16,7 +28,6 @@ * SoObjects/SOGo/SOGoUser.m: Don't retain/release the language ivar. - 2009-03-22 Wolfgang Sourdeau * SoObjects/SOGo/SOGoUser.m ([SOGoUser -language]): cache the diff --git a/NEWS b/NEWS index 8dfb2d775..993843c9e 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,9 @@ -1.0-20090317 ------------ +1.0-2009 +-------- +- when the status of an attendee changes, the event of an organizer is now updated correctly if it doesn't reside in the personal folder + +1.0-20090317 (1.0.0) +--------------- - when double-clicking in the all-day zone (day & week views), the "All Day event" checkbox is now automatically checked - replaced the JavaScript FastInit class by the dom:loaded event of Prototype JS - also updated Prototype JS to fix issues with IE7 diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.h b/SoObjects/Appointments/SOGoAppointmentFolder.h index ff7925290..66e5548f6 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.h +++ b/SoObjects/Appointments/SOGoAppointmentFolder.h @@ -107,6 +107,7 @@ inContext: (id) _ctx; - (SOGoAppointmentFolder *) lookupCalendarFolderForUID: (NSString *) uid; +- (NSArray *) lookupCalendarFoldersForUID: (NSString *) theUID; - (NSArray *) lookupCalendarFoldersForUIDs: (NSArray *) _uids inContext: (id) _ctx; - (NSArray *) lookupFreeBusyObjectsForUIDs: (NSArray *) _uids diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 44f6bf655..2ec5c945f 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -2406,6 +2406,37 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir return (SOGoAppointmentFolder *) currentContainer; } +// +// This method returns an array containing all the calendar folders +// of a specific user, excluding her/his subscriptions. +// +- (NSArray *) lookupCalendarFoldersForUID: (NSString *) theUID +{ + NSArray *aFolders; + NSEnumerator *e; + NSMutableArray *aUserFolders; + SOGoAppointmentFolders *aParent; + SOGoFolder *aContainer, *aFolder; + + aUserFolders = [NSMutableArray arrayWithCapacity: 16]; + aContainer = [[container container] container]; + aContainer = [aContainer lookupName: theUID + inContext: context + acquire: NO]; + aParent = [aContainer lookupName: @"Calendar" + inContext: context + acquire: NO]; + aFolders = [aParent subFolders]; + e = [aFolders objectEnumerator]; + while ( (aFolder = [e nextObject]) ) + { + if (![aFolder isSubscription]) + [aUserFolders addObject: aFolder]; + } + + return aUserFolders; +} + - (NSArray *) lookupCalendarFoldersForUIDs: (NSArray *) _uids inContext: (id)_ctx { diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index 740d5922e..7c6758eca 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -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]; diff --git a/UI/WebServerResources/lori-login.jpg b/UI/WebServerResources/lori-login.jpg deleted file mode 100644 index 7ab42d121..000000000 Binary files a/UI/WebServerResources/lori-login.jpg and /dev/null differ