See ChangeLog

Monotone-Parent: ac03f0324d16940145f9feb2cf56e61ed3ee5ef6
Monotone-Revision: 9aa24eb1e4a4107aaa9cf4e74e6f8c5b0477350a

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2009-11-10T16:18:57
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2009-11-10 16:18:57 +00:00
parent 4f5f19e613
commit e1797c9365
2 changed files with 35 additions and 24 deletions
+26 -23
View File
@@ -1494,35 +1494,38 @@ RANGE(2);
request = [context request];
json = [request formValueForKey: @"attendees"];
attendees = [NSArray array];
jsonScanner = [NSScanner scannerWithString: json];
if ([jsonScanner scanJSONObject: &attendeesData])
if ([json length])
{
newAttendees = [NSMutableArray new];
attendees = [attendeesData allValues];
max = [attendees count];
for (count = 0; count < max; count++)
attendees = [NSArray array];
jsonScanner = [NSScanner scannerWithString: json];
if ([jsonScanner scanJSONObject: &attendeesData])
{
currentData = [attendees objectAtIndex: count];
currentEmail = [currentData objectForKey: @"email"];
currentAttendee = [component findParticipantWithEmail: currentEmail];
if (!currentAttendee)
newAttendees = [NSMutableArray new];
attendees = [attendeesData allValues];
max = [attendees count];
for (count = 0; count < max; count++)
{
currentAttendee = [iCalPerson elementWithTag: @"attendee"];
[currentAttendee setCn: [currentData objectForKey: @"name"]];
[currentAttendee setEmail: currentEmail];
[currentAttendee setRole: @"REQ-PARTICIPANT"];
[currentAttendee setRsvp: @"TRUE"];
[currentAttendee
setParticipationStatus: iCalPersonPartStatNeedsAction];
currentData = [attendees objectAtIndex: count];
currentEmail = [currentData objectForKey: @"email"];
currentAttendee = [component findParticipantWithEmail: currentEmail];
if (!currentAttendee)
{
currentAttendee = [iCalPerson elementWithTag: @"attendee"];
[currentAttendee setCn: [currentData objectForKey: @"name"]];
[currentAttendee setEmail: currentEmail];
[currentAttendee setRole: @"REQ-PARTICIPANT"];
[currentAttendee setRsvp: @"TRUE"];
[currentAttendee
setParticipationStatus: iCalPersonPartStatNeedsAction];
}
[newAttendees addObject: currentAttendee];
}
[newAttendees addObject: currentAttendee];
[component setAttendees: newAttendees];
[newAttendees release];
}
[component setAttendees: newAttendees];
[newAttendees release];
else
NSLog(@"Error scanning following JSON:\n%@", json);
}
else
NSLog(@"Error scanning following JSON:\n%@", json);
}
- (void) _handleOrganizer