See ChangeLog

Monotone-Parent: 15a323395e06e9dba494ab7c7ad2871d2e95bdd4
Monotone-Revision: 048651c03289ee8aea9a9d3d3088a91e534dbe5b

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2009-12-22T22:45:37
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte committed 2009-12-22 22:45:37 +00:00
1 parent 8ee88b6a42
commit 84b7582e03
37 files changed
+101 -673

No files matched your search

+33 -22
View File
@@ -245,10 +245,12 @@ static NSString *defaultUserID = @"anyone";
inContext: (id) localContext
{
SOGoMailFolder *trashFolder;
id result;
NSException *error;
NSString *folderName;
NGImap4Client *client;
NSString *folderName;
NSException *error;
id result;
BOOL b;
trashFolder = [[self mailAccountFolder] trashFolderInContext: localContext];
if ([trashFolder isNotNull])
@@ -260,19 +262,27 @@ static NSString *defaultUserID = @"anyone";
client = [[self imap4Connection] client];
[imap4 selectFolder: [self imap4URL]];
folderName = [imap4 imap4FolderNameForURL: [trashFolder imap4URL]];
b = YES;
// If our Trash folder doesn't exist when we try to copy messages
// to it, we create it.
result = [[client status: folderName flags: [NSArray arrayWithObject: @"UIDVALIDITY"]]
objectForKey: @"result"];
// If we are deleting messages within the Trash folder itself, we
// do not, of course, try to move messages to the Trash folder.
if (![folderName isEqualToString: [self relativeImap4Name]])
{
// If our Trash folder doesn't exist when we try to copy messages
// to it, we create it.
result = [[client status: folderName flags: [NSArray arrayWithObject: @"UIDVALIDITY"]]
objectForKey: @"result"];
if (![result boolValue])
result = [[self imap4Connection] createMailbox: folderName atURL: [[self mailAccountFolder] imap4URL]];
if (!result || [result boolValue])
result = [client copyUids: uids toFolder: folderName];
b = [[result valueForKey: @"result"] boolValue];
}
if (![result boolValue])
result = [[self imap4Connection] createMailbox: folderName atURL: [[self mailAccountFolder] imap4URL]];
if (!result || [result boolValue])
result = [client copyUids: uids toFolder: folderName];
if ([[result valueForKey: @"result"] boolValue])
if (b)
{
result = [client storeFlags: [NSArray arrayWithObject: @"Deleted"]
forUIDs: uids addOrRemove: YES];
@@ -433,15 +443,16 @@ static NSString *defaultUserID = @"anyone";
result = [self copyUIDs: uids toFolder: destinationFolder inContext: localContext];
if ( ![result isNotNull] ) {
result = [client storeFlags: [NSArray arrayWithObject: @"Deleted"]
forUIDs: uids addOrRemove: YES];
if ([[result valueForKey: @"result"] boolValue])
{
[self markForExpunge];
result = nil;
if ( ![result isNotNull] )
{
result = [client storeFlags: [NSArray arrayWithObject: @"Deleted"]
forUIDs: uids addOrRemove: YES];
if ([[result valueForKey: @"result"] boolValue])
{
[self markForExpunge];
result = nil;
}
}
}
return result;
}
-27
View File
@@ -1068,18 +1068,6 @@ static BOOL debugSoParts = NO;
/* some mail classification */
- (BOOL) isKolabObject
{
NSDictionary *h;
if ((h = [self mailHeaders]) != nil)
return [[h objectForKey: @"x-kolab-type"] isNotEmpty];
// TODO: we could check the body structure?
return NO;
}
- (BOOL) isMailingListMail
{
NSDictionary *h;
@@ -1192,21 +1180,6 @@ static BOOL debugSoParts = NO;
- (NSString *) outlookMessageClass
{
NSString *type;
if ((type = [[self mailHeaders] objectForKey: @"x-kolab-type"]) != nil) {
if ([type isEqualToString: @"application/x-vnd.kolab.contact"])
return @"IPM.Contact";
if ([type isEqualToString: @"application/x-vnd.kolab.task"])
return @"IPM.Task";
if ([type isEqualToString: @"application/x-vnd.kolab.event"])
return @"IPM.Appointment";
if ([type isEqualToString: @"application/x-vnd.kolab.note"])
return @"IPM.Note";
if ([type isEqualToString: @"application/x-vnd.kolab.journal"])
return @"IPM.Journal";
}
return @"IPM.Message"; /* email, default class */
}
+1 -1
View File
@@ -1,4 +1,4 @@
/* SOGoGCSFolder.m - this file is part of SOGo
/* SOGoObject.m - this file is part of SOGo
*
* Copyright (C) 2004-2005 SKYRIX Software AG
* Copyright (C) 2006-2009 Inverse inc.