See ChangeLog
Monotone-Parent: 04ba7fac2627906e1d9fb91e79b12769e1957a41 Monotone-Revision: 00ac31b5372de5deb01c919e39d6eacc4a512125 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-08-11T02:06:27 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
6a5af3ba35
commit
ed79ed79fd
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2009-08-11 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor
|
||||
-_handleOrganizer]): remove organizer when the event has no attendee.
|
||||
([UIxComponentEditor -_toolbarForOwner:andClientObject:]): return
|
||||
the proper toolbar when editing the occurrence of a repeating event.
|
||||
|
||||
* SoObjects/Appointments/SOGoAppointmentObject.m
|
||||
([SOGoAppointmentObject -saveComponent:]): when removing a single
|
||||
attendee from an event, the organizer is no longer defined;
|
||||
therefore, we must check if the owner is the organizer of the
|
||||
previous version of the event, not the new event.
|
||||
|
||||
2009-08-10 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/LDAPUserManager.m
|
||||
|
|
|
@ -274,6 +274,13 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
// TODO : if [theEvent recurrenceId], only update this occurrence
|
||||
// in attendee's calendar
|
||||
|
||||
// TODO : when updating the master event, handle exception dates
|
||||
// in attendee's calendar (add exception dates and remove matching
|
||||
// occurrences) -- see _updateRecurrenceIDsWithEvent:
|
||||
|
||||
iCalString = [[theEvent parent] versitString];
|
||||
}
|
||||
|
||||
|
@ -508,46 +515,44 @@
|
|||
// as the event's UID might get modified in SOGoCalendarComponent: -saveComponent:
|
||||
[super saveComponent: newEvent];
|
||||
|
||||
if ([newEvent userIsOrganizer: ownerUser])
|
||||
if ([self isNew])
|
||||
{
|
||||
if ([self isNew])
|
||||
// New event -- send invitation to all attendees
|
||||
attendees = [newEvent attendeesWithoutUser: ownerUser];
|
||||
if ([attendees count])
|
||||
{
|
||||
// New event -- send invitation to all attendees
|
||||
attendees = [newEvent attendeesWithoutUser: ownerUser];
|
||||
if ([attendees count])
|
||||
{
|
||||
[self _handleAddedUsers: attendees fromEvent: newEvent];
|
||||
[self sendEMailUsingTemplateNamed: @"Invitation"
|
||||
forObject: [newEvent itipEntryWithMethod: @"request"]
|
||||
previousObject: nil
|
||||
toAttendees: attendees];
|
||||
}
|
||||
|
||||
if (![[newEvent attendees] count])
|
||||
[[newEvent uniqueChildWithTag: @"organizer"] setValue: 0
|
||||
to: @""];
|
||||
[self _handleAddedUsers: attendees fromEvent: newEvent];
|
||||
[self sendEMailUsingTemplateNamed: @"Invitation"
|
||||
forObject: [newEvent itipEntryWithMethod: @"request"]
|
||||
previousObject: nil
|
||||
toAttendees: attendees];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Event is modified -- sent update status to all attendees
|
||||
// and modify their calendars.
|
||||
recurrenceId = [newEvent recurrenceId];
|
||||
if (recurrenceId == nil)
|
||||
oldEvent = [self component: NO secure: NO];
|
||||
else
|
||||
{
|
||||
// Event is modified -- sent update status to all attendees
|
||||
// and modify their calendars.
|
||||
recurrenceId = [newEvent recurrenceId];
|
||||
if (recurrenceId == nil)
|
||||
oldEvent = [self component: NO secure: NO];
|
||||
else
|
||||
{
|
||||
// If recurrenceId is defined, find the specified occurence
|
||||
// within the repeating vEvent.
|
||||
recurrenceTime = [NSString stringWithFormat: @"%f", [recurrenceId timeIntervalSince1970]];
|
||||
oldEvent = (iCalEvent*)[self lookupOccurence: recurrenceTime];
|
||||
if (oldEvent == nil)
|
||||
// If no occurence found, create one
|
||||
oldEvent = (iCalEvent*)[self newOccurenceWithID: recurrenceTime];
|
||||
}
|
||||
// If recurrenceId is defined, find the specified occurence
|
||||
// within the repeating vEvent.
|
||||
recurrenceTime = [NSString stringWithFormat: @"%f", [recurrenceId timeIntervalSince1970]];
|
||||
oldEvent = (iCalEvent*)[self lookupOccurence: recurrenceTime];
|
||||
if (oldEvent == nil)
|
||||
// If no occurence found, create one
|
||||
oldEvent = (iCalEvent*)[self newOccurenceWithID: recurrenceTime];
|
||||
}
|
||||
|
||||
if ([[[oldEvent parent] firstChildWithTag: @"vevent"] userIsOrganizer: ownerUser])
|
||||
{
|
||||
// The owner is the organizer of the event; handle the modifications
|
||||
|
||||
[self _handleUpdatedEvent: newEvent fromOldEvent: oldEvent];
|
||||
|
||||
// The sequence has possibly been increased -- resave the event.
|
||||
// This will also take care of a decomposed group.
|
||||
[super saveComponent: newEvent];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1535,25 +1535,23 @@ RANGE(2);
|
|||
{
|
||||
NSString *organizerEmail;
|
||||
NSString *owner, *login;
|
||||
BOOL isOwner, hasOrganizer, hasAttendees;
|
||||
BOOL isOwner;
|
||||
|
||||
//owner = [[self clientObject] ownerInContext: context];
|
||||
owner = [componentCalendar ownerInContext: context];
|
||||
login = [[context activeUser] login];
|
||||
isOwner = [owner isEqualToString: login];
|
||||
hasAttendees = [self hasAttendees];
|
||||
organizerEmail = [[component organizer] email];
|
||||
hasOrganizer = ([organizerEmail length] > 0);
|
||||
|
||||
#if 1
|
||||
ASSIGN (organizer, [iCalPerson elementWithTag: @"organizer"]);
|
||||
[component setOrganizer: organizer];
|
||||
|
||||
if (hasAttendees)
|
||||
{
|
||||
SOGoUser *user;
|
||||
id identity;
|
||||
|
||||
ASSIGN (organizer, [iCalPerson elementWithTag: @"organizer"]);
|
||||
[component setOrganizer: organizer];
|
||||
|
||||
user = [SOGoUser userWithLogin: owner roles: nil];
|
||||
identity = [user defaultIdentity];
|
||||
[organizer setCn: [identity objectForKey: @"fullName"]];
|
||||
|
@ -1568,7 +1566,15 @@ RANGE(2);
|
|||
value: [NSString stringWithFormat: @"\"MAILTO:%@\"", currentEmail]];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
organizer = nil;
|
||||
}
|
||||
[component setOrganizer: organizer];
|
||||
#else
|
||||
BOOL hasOrganizer, hasAttendees;
|
||||
organizerEmail = [[component organizer] email];
|
||||
hasOrganizer = ([organizerEmail length] > 0);
|
||||
if (hasOrganizer)
|
||||
{
|
||||
if (isOwner && !hasAttendees)
|
||||
|
@ -1924,7 +1930,8 @@ RANGE(2);
|
|||
toolbarFilename = @"SOGoEmpty.toolbar";
|
||||
else
|
||||
{
|
||||
if ([clientObject isKindOfClass: [SOGoAppointmentObject class]])
|
||||
if ([clientObject isKindOfClass: [SOGoAppointmentObject class]]
|
||||
|| [clientObject isKindOfClass: [SOGoAppointmentOccurence class]])
|
||||
toolbarFilename = @"SOGoAppointmentObject.toolbar";
|
||||
else
|
||||
toolbarFilename = @"SOGoTaskObject.toolbar";
|
||||
|
|
Loading…
Reference in New Issue