Fix for bug #1850 and removed dead code/comments.

This commit is contained in:
Ludovic Marcotte
2012-11-30 13:57:55 -05:00
parent 0e02334fda
commit eed17fd95a

View File

@@ -960,6 +960,10 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
[otherAttendee setDelegatedTo: [attendee delegatedTo]];
[otherAttendee setDelegatedFrom: [attendee delegatedFrom]];
// Remove the RSVP attribute, as an action from the attendee
// was actually performed, and this confuses iCal (bug #1850)
[[otherAttendee attributes] removeObjectForKey: @"RSVP"];
// If one has accepted / declined an invitation on behalf of
// the attendee, we add the user to the SENT-BY attribute.
if (b && ![[currentUser login] isEqualToString: [theOwnerUser login]])
@@ -991,7 +995,7 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
//
// This method is invoked from the SOGo Web interface.
// This method is invoked from the SOGo Web interface or from the DAV interface.
//
// - theOwnerUser is owner of the calendar where the attendee
// participation state has changed.
@@ -1055,6 +1059,10 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
|| [currentStatus caseInsensitiveCompare: newStatus]
!= NSOrderedSame)
{
NSMutableArray *delegates;
NSString *delegatedUID;
delegatedUID = nil;
[attendee setPartStat: newStatus];
// If one has accepted / declined an invitation on behalf of
@@ -1079,9 +1087,6 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
[attendee setDelegatedTo: [delegate email]];
NSString *delegatedUID = nil;
NSMutableArray *delegates;
if (removeDelegate)
{
delegates = [NSMutableArray array];
@@ -1115,13 +1120,7 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
previousObject: nil
toAttendees: delegates
withType: @"calendar:cancellation"];
#if 0
// DELETE CODE
[self sendReceiptEmailUsingTemplateNamed: @"Deletion"
forObject: event
to: delegates];
#endif
}
} // if (removeDelegate)
if (addDelegate)
{
@@ -1140,12 +1139,7 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
previousObject: nil
toAttendees: delegates
withType: @"calendar:invitation"];
#if 0
// DELETE CODE
[self sendReceiptEmailUsingTemplateNamed: @"Invitation"
forObject: event to: delegates];
#endif
}
} // if (addDelegate)
// If the current user isn't the organizer of the event
// that has just been updated, we update the event and
@@ -1364,22 +1358,22 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
reason: @"delegate is a group"];
}
if (ex == nil)
ex = [self _handleAttendee: attendee
withDelegate: delegate
ownerUser: ownerUser
statusChange: _status
inEvent: event];
{
// Remove the RSVP attribute, as an action from the attendee
// was actually performed, and this confuses iCal (bug #1850)
[[attendee attributes] removeObjectForKey: @"RSVP"];
ex = [self _handleAttendee: attendee
withDelegate: delegate
ownerUser: ownerUser
statusChange: _status
inEvent: event];
}
if (ex == nil)
{
// We generate the updated iCalendar file and we save it in
// the database. We do this ONLY when using SOGo from the
// Web interface. Over DAV, it'll be handled directly in
// PUTAction:
/* FIXME: this is a hack caused by the fact that
updateContentWithCalendar:fromRequest: invokes
changeParticipationStatusblabla, while the latter was
actually designed to be invoked by web methods only */
if (![context request] || [[context request] handledByDefaultHandler])
ex = [self saveContentString: [calendar versitString]];
}