From 844589038b2131e3ee9707b2c8795bbca5061c3c Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 14 Sep 2007 23:29:23 +0000 Subject: [PATCH] Monotone-Parent: 2f6b4aaf04c065e823ffe07f1d387623c738b798 Monotone-Revision: 3f88a26e2df5b2986893fbd4773fef7036cc8d70 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-09-14T23:29:23 Monotone-Branch: ca.inverse.sogo --- SoObjects/Appointments/SOGoTaskObject.m | 117 ++++++++++++------------ 1 file changed, 60 insertions(+), 57 deletions(-) diff --git a/SoObjects/Appointments/SOGoTaskObject.m b/SoObjects/Appointments/SOGoTaskObject.m index 2357ac8b2..5c628fa66 100644 --- a/SoObjects/Appointments/SOGoTaskObject.m +++ b/SoObjects/Appointments/SOGoTaskObject.m @@ -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 {