Monotone-Parent: 2f6b4aaf04c065e823ffe07f1d387623c738b798

Monotone-Revision: 3f88a26e2df5b2986893fbd4773fef7036cc8d70

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-09-14T23:29:23
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-09-14 23:29:23 +00:00
parent 519d8fb703
commit 844589038b
+60 -57
View File
@@ -160,38 +160,38 @@ static NSString *mailTemplateDefaultLanguage = nil;
}
return allErrors;
}
- (NSException *)deleteInUIDs:(NSArray *)_uids {
NSEnumerator *e;
id folder;
NSException *allErrors = nil;
// - (NSException *)deleteInUIDs:(NSArray *)_uids {
// NSEnumerator *e;
// id folder;
// NSException *allErrors = nil;
e = [[container lookupCalendarFoldersForUIDs: _uids inContext: context]
objectEnumerator];
while ((folder = [e nextObject])) {
NSException *error;
SOGoTaskObject *task;
// e = [[container lookupCalendarFoldersForUIDs: _uids inContext: context]
// objectEnumerator];
// while ((folder = [e nextObject])) {
// NSException *error;
// SOGoTaskObject *task;
task = [folder lookupName: [self nameInContainer]
inContext: context
acquire: NO];
if (![task isNotNull]) {
[self logWithFormat:@"Note: did not find '%@' in folder: %@",
[self nameInContainer], folder];
continue;
}
if ([task isKindOfClass: [NSException class]]) {
[self logWithFormat:@"Exception: %@", [(NSException *) task reason]];
continue;
}
// task = [folder lookupName: [self nameInContainer]
// inContext: context
// acquire: NO];
// if (![task isNotNull]) {
// [self logWithFormat:@"Note: did not find '%@' in folder: %@",
// [self nameInContainer], folder];
// continue;
// }
// if ([task isKindOfClass: [NSException class]]) {
// [self logWithFormat:@"Exception: %@", [(NSException *) task reason]];
// continue;
// }
if ((error = [task primaryDelete]) != nil) {
[self logWithFormat:@"Note: failed to delete in folder: %@", folder];
// TODO: make compound
allErrors = error;
}
}
return allErrors;
}
// if ((error = [task primaryDelete]) != nil) {
// [self logWithFormat:@"Note: failed to delete in folder: %@", folder];
// // TODO: make compound
// allErrors = error;
// }
// }
// return allErrors;
// }
/* "iCal multifolder saves" */
@@ -396,45 +396,48 @@ static NSString *mailTemplateDefaultLanguage = nil;
- delete in removed folders
- send iMIP mail for all folders not found
*/
iCalToDo *task;
NSArray *removedUIDs;
NSMutableArray *attendees;
// iCalToDo *task;
// NSArray *removedUIDs;
// NSMutableArray *attendees;
/* load existing content */
[self primaryDelete];
return nil;
// /* load existing content */
task = (iCalToDo *) [self component: NO];
// task = (iCalToDo *) [self component: NO];
/* compare sequence if requested */
// /* compare sequence if requested */
if (_v != 0) {
// TODO
}
// if (_v != 0) {
// // TODO
// }
removedUIDs = [self attendeeUIDsFromTask:task];
// removedUIDs = [self attendeeUIDsFromTask:task];
if ([self sendEMailNotifications])
{
/* send notification email to attendees excluding organizer */
attendees = [NSMutableArray arrayWithArray:[task attendees]];
[attendees removePerson:[task organizer]];
// if ([self sendEMailNotifications])
// {
// /* send notification email to attendees excluding organizer */
// attendees = [NSMutableArray arrayWithArray:[task attendees]];
// [attendees removePerson:[task organizer]];
/* flag task as being cancelled */
[(iCalCalendar *) [task parent] setMethod: @"cancel"];
[task increaseSequence];
// /* flag task as being cancelled */
// [(iCalCalendar *) [task parent] setMethod: @"cancel"];
// [task increaseSequence];
/* remove all attendees to signal complete removal */
[task removeAllAttendees];
// /* remove all attendees to signal complete removal */
// [task removeAllAttendees];
/* send notification email */
[self sendEMailUsingTemplateNamed: @"Deletion"
forOldObject: nil
andNewObject: task
toAttendees: attendees];
}
// /* send notification email */
// [self sendEMailUsingTemplateNamed: @"Deletion"
// forOldObject: nil
// andNewObject: task
// toAttendees: attendees];
// }
/* perform */
// /* perform */
return [self deleteInUIDs:removedUIDs];
// return [self deleteInUIDs:removedUIDs];
}
- (NSException *)saveContentString:(NSString *)_iCalString {