From ee3f45e0df2af0bd154ebae9f1bbf780b0c65220 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 11 Aug 2009 16:52:10 +0000 Subject: [PATCH] Monotone-Parent: 00ac31b5372de5deb01c919e39d6eacc4a512125 Monotone-Revision: 6dba4565cf1a4808254012e5e6299fe143f884f5 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-08-11T16:52:10 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 10 +++++++++ .../Appointments/SOGoAppointmentObject.m | 21 ++++++++++++------- UI/Scheduler/UIxComponentEditor.m | 8 ++++--- 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 795b0ab57..f8ef5503a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-08-11 Wolfgang Sourdeau + + * UI/Scheduler/UIxComponentEditor.m + (-takeValuesFromRequest:inContext:): same as below, for the organizer. + + * SoObjects/Appointments/SOGoAppointmentObject.m + (-changeParticipationStatus:forRecurrenceId): when setting the + "SENT-BY" attribute value, we need to use "setValue:0.." instead + "addValue:" to avoid invalid accumulation of values. + 2009-08-11 Francis Lachapelle * UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index d92a7b9f6..0ad2d1f57 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -620,10 +620,12 @@ // the attendee, we add the user to the SENT-BY attribute. if (b && ![[currentUser login] isEqualToString: [theOwnerUser login]]) { - NSString *currentEmail; + NSString *currentEmail, *quotedEmail; currentEmail = [[currentUser allEmails] objectAtIndex: 0]; - [otherAttendee addAttribute: @"SENT-BY" - value: [NSString stringWithFormat: @"\"MAILTO:%@\"", currentEmail]]; + quotedEmail = [NSString stringWithFormat: @"\"MAILTO:%@\"", + currentEmail]; + [otherAttendee setValue: 0 ofAttribute: @"SENT-BY" + to: quotedEmail]; } else { @@ -672,10 +674,12 @@ currentUser = [context activeUser]; if (![[currentUser login] isEqualToString: [theOwnerUser login]]) { - NSString *currentEmail; - currentEmail = [[currentUser allEmails] objectAtIndex: 0]; - [attendee addAttribute: @"SENT-BY" - value: [NSString stringWithFormat: @"\"MAILTO:%@\"", currentEmail]]; + NSString *currentEmail, *quotedEmail; + currentEmail = [[currentUser allEmails] objectAtIndex: 0]; + quotedEmail = [NSString stringWithFormat: @"\"MAILTO:%@\"", + currentEmail]; + [attendee setValue: 0 ofAttribute: @"SENT-BY" + to: quotedEmail]; } else { @@ -1130,7 +1134,8 @@ return [self changeParticipationStatus: _status forRecurrenceId: nil]; } -- (NSException *) changeParticipationStatus: (NSString *) _status forRecurrenceId: (NSCalendarDate *) _recurrenceId +- (NSException *) changeParticipationStatus: (NSString *) _status + forRecurrenceId: (NSCalendarDate *) _recurrenceId { iCalCalendar *calendar; iCalEvent *event; diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index a26545287..94352e2b2 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -1559,11 +1559,13 @@ RANGE(2); if (!isOwner) { - NSString *currentEmail; + NSString *currentEmail, *quotedEmail; currentEmail = [[[context activeUser] allEmails] objectAtIndex: 0]; - [organizer addAttribute: @"SENT-BY" - value: [NSString stringWithFormat: @"\"MAILTO:%@\"", currentEmail]]; + quotedEmail = [NSString stringWithFormat: @"\"MAILTO:%@\"", + currentEmail]; + [organizer setValue: 0 ofAttribute: @"SENT-BY" + to: quotedEmail]; } } else