mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-11 14:57:12 +00:00
See ChangeLog
Monotone-Parent: 04ba7fac2627906e1d9fb91e79b12769e1957a41 Monotone-Revision: 00ac31b5372de5deb01c919e39d6eacc4a512125 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-08-11T02:06:27 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
6a5af3ba35
commit
ed79ed79fd
3 files changed
+64
-39
No files matched your search
@@ -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>
|
2009-08-10 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||||
|
|
||||||
* SoObjects/SOGo/LDAPUserManager.m
|
* SoObjects/SOGo/LDAPUserManager.m
|
||||||
|
|||||||
@@ -274,6 +274,13 @@
|
|||||||
}
|
}
|
||||||
else
|
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];
|
iCalString = [[theEvent parent] versitString];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -508,46 +515,44 @@
|
|||||||
// as the event's UID might get modified in SOGoCalendarComponent: -saveComponent:
|
// as the event's UID might get modified in SOGoCalendarComponent: -saveComponent:
|
||||||
[super saveComponent: newEvent];
|
[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
|
[self _handleAddedUsers: attendees fromEvent: newEvent];
|
||||||
attendees = [newEvent attendeesWithoutUser: ownerUser];
|
[self sendEMailUsingTemplateNamed: @"Invitation"
|
||||||
if ([attendees count])
|
forObject: [newEvent itipEntryWithMethod: @"request"]
|
||||||
{
|
previousObject: nil
|
||||||
[self _handleAddedUsers: attendees fromEvent: newEvent];
|
toAttendees: attendees];
|
||||||
[self sendEMailUsingTemplateNamed: @"Invitation"
|
|
||||||
forObject: [newEvent itipEntryWithMethod: @"request"]
|
|
||||||
previousObject: nil
|
|
||||||
toAttendees: attendees];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (![[newEvent attendees] count])
|
|
||||||
[[newEvent uniqueChildWithTag: @"organizer"] setValue: 0
|
|
||||||
to: @""];
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
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
|
else
|
||||||
{
|
{
|
||||||
// Event is modified -- sent update status to all attendees
|
// If recurrenceId is defined, find the specified occurence
|
||||||
// and modify their calendars.
|
// within the repeating vEvent.
|
||||||
recurrenceId = [newEvent recurrenceId];
|
recurrenceTime = [NSString stringWithFormat: @"%f", [recurrenceId timeIntervalSince1970]];
|
||||||
if (recurrenceId == nil)
|
oldEvent = (iCalEvent*)[self lookupOccurence: recurrenceTime];
|
||||||
oldEvent = [self component: NO secure: NO];
|
if (oldEvent == nil)
|
||||||
else
|
// 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]];
|
if ([[[oldEvent parent] firstChildWithTag: @"vevent"] userIsOrganizer: ownerUser])
|
||||||
oldEvent = (iCalEvent*)[self lookupOccurence: recurrenceTime];
|
{
|
||||||
if (oldEvent == nil)
|
// The owner is the organizer of the event; handle the modifications
|
||||||
// If no occurence found, create one
|
|
||||||
oldEvent = (iCalEvent*)[self newOccurenceWithID: recurrenceTime];
|
|
||||||
}
|
|
||||||
[self _handleUpdatedEvent: newEvent fromOldEvent: oldEvent];
|
[self _handleUpdatedEvent: newEvent fromOldEvent: oldEvent];
|
||||||
|
|
||||||
// The sequence has possibly been increased -- resave the event.
|
// The sequence has possibly been increased -- resave the event.
|
||||||
// This will also take care of a decomposed group.
|
|
||||||
[super saveComponent: newEvent];
|
[super saveComponent: newEvent];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1535,25 +1535,23 @@ RANGE(2);
|
|||||||
{
|
{
|
||||||
NSString *organizerEmail;
|
NSString *organizerEmail;
|
||||||
NSString *owner, *login;
|
NSString *owner, *login;
|
||||||
BOOL isOwner, hasOrganizer, hasAttendees;
|
BOOL isOwner;
|
||||||
|
|
||||||
//owner = [[self clientObject] ownerInContext: context];
|
//owner = [[self clientObject] ownerInContext: context];
|
||||||
owner = [componentCalendar ownerInContext: context];
|
owner = [componentCalendar ownerInContext: context];
|
||||||
login = [[context activeUser] login];
|
login = [[context activeUser] login];
|
||||||
isOwner = [owner isEqualToString: login];
|
isOwner = [owner isEqualToString: login];
|
||||||
hasAttendees = [self hasAttendees];
|
hasAttendees = [self hasAttendees];
|
||||||
organizerEmail = [[component organizer] email];
|
|
||||||
hasOrganizer = ([organizerEmail length] > 0);
|
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
ASSIGN (organizer, [iCalPerson elementWithTag: @"organizer"]);
|
|
||||||
[component setOrganizer: organizer];
|
|
||||||
|
|
||||||
if (hasAttendees)
|
if (hasAttendees)
|
||||||
{
|
{
|
||||||
SOGoUser *user;
|
SOGoUser *user;
|
||||||
id identity;
|
id identity;
|
||||||
|
|
||||||
|
ASSIGN (organizer, [iCalPerson elementWithTag: @"organizer"]);
|
||||||
|
[component setOrganizer: organizer];
|
||||||
|
|
||||||
user = [SOGoUser userWithLogin: owner roles: nil];
|
user = [SOGoUser userWithLogin: owner roles: nil];
|
||||||
identity = [user defaultIdentity];
|
identity = [user defaultIdentity];
|
||||||
[organizer setCn: [identity objectForKey: @"fullName"]];
|
[organizer setCn: [identity objectForKey: @"fullName"]];
|
||||||
@@ -1568,7 +1566,15 @@ RANGE(2);
|
|||||||
value: [NSString stringWithFormat: @"\"MAILTO:%@\"", currentEmail]];
|
value: [NSString stringWithFormat: @"\"MAILTO:%@\"", currentEmail]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
organizer = nil;
|
||||||
|
}
|
||||||
|
[component setOrganizer: organizer];
|
||||||
#else
|
#else
|
||||||
|
BOOL hasOrganizer, hasAttendees;
|
||||||
|
organizerEmail = [[component organizer] email];
|
||||||
|
hasOrganizer = ([organizerEmail length] > 0);
|
||||||
if (hasOrganizer)
|
if (hasOrganizer)
|
||||||
{
|
{
|
||||||
if (isOwner && !hasAttendees)
|
if (isOwner && !hasAttendees)
|
||||||
@@ -1924,7 +1930,8 @@ RANGE(2);
|
|||||||
toolbarFilename = @"SOGoEmpty.toolbar";
|
toolbarFilename = @"SOGoEmpty.toolbar";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ([clientObject isKindOfClass: [SOGoAppointmentObject class]])
|
if ([clientObject isKindOfClass: [SOGoAppointmentObject class]]
|
||||||
|
|| [clientObject isKindOfClass: [SOGoAppointmentOccurence class]])
|
||||||
toolbarFilename = @"SOGoAppointmentObject.toolbar";
|
toolbarFilename = @"SOGoAppointmentObject.toolbar";
|
||||||
else
|
else
|
||||||
toolbarFilename = @"SOGoTaskObject.toolbar";
|
toolbarFilename = @"SOGoTaskObject.toolbar";
|
||||||
|
|||||||
Reference in new issue
Block a user