diff --git a/ChangeLog b/ChangeLog index 1a176c7a0..d0c67668d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-07-13 Francis Lachapelle + * SoObjects/Mailer/SOGoMailFolder.m + (-deleteUIDs:useTrashFolder:inContext:): the withTrash argument is + now a pointer since the method can modify it when the current + folder is the trash folder. + * SoObjects/Contacts/SOGoContactSourceFolder.m (-_flattenedRecord:): added c_component key so the proper icon appears beside entries in the Web interface. diff --git a/SoObjects/Mailer/SOGoMailFolder.h b/SoObjects/Mailer/SOGoMailFolder.h index f0cc8c553..dd5603b37 100644 --- a/SoObjects/Mailer/SOGoMailFolder.h +++ b/SoObjects/Mailer/SOGoMailFolder.h @@ -53,7 +53,7 @@ - (NSArray *) toManyRelationshipKeys; - (NSException *) deleteUIDs: (NSArray *) uids - useTrashFolder: (BOOL) withTrash + useTrashFolder: (BOOL *) withTrash inContext: (id) context; - (WOResponse *) archiveUIDs: (NSArray *) uids inArchiveNamed: (NSString *) archiveName diff --git a/SoObjects/Mailer/SOGoMailFolder.m b/SoObjects/Mailer/SOGoMailFolder.m index b03d70369..5dbcc9bf3 100644 --- a/SoObjects/Mailer/SOGoMailFolder.m +++ b/SoObjects/Mailer/SOGoMailFolder.m @@ -265,8 +265,9 @@ static NSString *defaultUserID = @"anyone"; } /* messages */ + - (NSException *) deleteUIDs: (NSArray *) uids - useTrashFolder: (BOOL) withTrash + useTrashFolder: (BOOL *) withTrash inContext: (id) localContext { SOGoMailFolder *trashFolder; @@ -279,7 +280,7 @@ static NSString *defaultUserID = @"anyone"; client = nil; trashFolder = nil; b = YES; - if (withTrash) + if (*withTrash) { trashFolder = [[self mailAccountFolder] trashFolderInContext: localContext]; b = NO; @@ -298,7 +299,7 @@ static NSString *defaultUserID = @"anyone"; // do not, of course, try to move messages to the Trash folder. if ([folderName isEqualToString: [self relativeImap4Name]]) { - withTrash = NO; + *withTrash = NO; } else { @@ -335,7 +336,7 @@ static NSString *defaultUserID = @"anyone"; objectForKey: @"result"]; if ([result boolValue]) { - if (withTrash) + if (*withTrash) { [self markForExpunge]; if (trashFolder) diff --git a/UI/MailerUI/UIxMailFolderActions.m b/UI/MailerUI/UIxMailFolderActions.m index 33dab148d..57f94973e 100644 --- a/UI/MailerUI/UIxMailFolderActions.m +++ b/UI/MailerUI/UIxMailFolderActions.m @@ -234,20 +234,20 @@ NSArray *uids; NSString *value; NSDictionary *data; - BOOL withoutTrash; + BOOL withTrash; co = [self clientObject]; value = [[context request] formValueForKey: @"uid"]; - withoutTrash = [[[context request] formValueForKey: @"withoutTrash"] boolValue]; + withTrash = ![[[context request] formValueForKey: @"withoutTrash"] boolValue]; response = nil; if ([value length] > 0) { uids = [value componentsSeparatedByString: @","]; - response = (WOResponse *) [co deleteUIDs: uids useTrashFolder: !withoutTrash inContext: context]; + response = (WOResponse *) [co deleteUIDs: uids useTrashFolder: &withTrash inContext: context]; if (!response) { - if (withoutTrash) + if (!withTrash) { // When not using a trash folder, return the quota account = [co mailAccountFolder];