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
maint-2.0.2
Francis Lachapelle 2009-03-23 21:19:55 +00:00
parent 8715ec448b
commit 71d4126149
6 changed files with 75 additions and 20 deletions

View File

@ -1,3 +1,15 @@
2009-03-23 Francis Lachapelle <flachapelle@inverse.ca>
* 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 <wsourdeau@inverse.ca>
* 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 <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoUser.m ([SOGoUser -language]): cache the

8
NEWS
View File

@ -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

View File

@ -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

View File

@ -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
{

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];

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB