See ChangeLog

Monotone-Parent: 0ffde732abb09a8e3d0382ed47a3ec787f25796e
Monotone-Revision: 3d7f4c315141a708ca8e3535fb0792843e1b8f9a

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2011-09-14T20:05:09
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Ludovic Marcotte 2011-09-14 20:05:09 +00:00
parent 057a38355b
commit 6b0a114454
3 changed files with 23 additions and 8 deletions

View File

@ -20,7 +20,11 @@
* OpenChange/MAPIStoreFolder.m: (getPrAccess:inMemCtx:) fixed
permissions issue - we were returning a wrong value leading to
IMAP subfolders not being "writable"
* SoObject/Mailer/SOGoMailFolder.m (prefetchCoreInfosForMessageKeys:)
Fixed a MAJOR issue regarding keys handling. We should NEVER assume
the untagged IMAP response's order will be the same as the FETCH's one!
2011-09-04 Ludovic Marcotte <lmarcotte@inverse.ca>
* OpenChange/MAPIStoreMapping.m: (MAPIStoreMappingTDBTraverse())

View File

@ -2,14 +2,14 @@
Copyright (C) 2009-2011 Inverse inc.
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of OpenGroupware.org.
This file is part of SOGo
OGo is free software; you can redistribute it and/or modify it under
SOGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
SOGo is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.

View File

@ -270,9 +270,10 @@ static NSString *defaultUserID = @"anyone";
/* messages */
- (void) prefetchCoreInfosForMessageKeys: (NSArray *) keys
{
NSDictionary *infos;
NSMutableArray *uids;
NSUInteger count, max, keyLength;
NSMutableArray *uids;
NSDictionary *infos;
NSArray *allValues;
NSString *key;
if (!SOGoMailCoreInfoKeys)
@ -301,8 +302,18 @@ static NSString *defaultUserID = @"anyone";
infos = (NSDictionary *) [self fetchUIDs: uids parts: SOGoMailCoreInfoKeys];
prefetchedInfos = [[NSMutableDictionary alloc] initWithCapacity: max];
[prefetchedInfos setObjects: [infos objectForKey: @"fetch"]
forKeys: uids];
// We MUST NOT use setObjects:forKeys here as the fetch's array does NOT
// necessarily have the same order!
allValues = [infos objectForKey: @"fetch"];
max = [allValues count];
for (count = 0; count < max ; count++)
{
infos = [allValues objectAtIndex: count];
[prefetchedInfos setObject: infos
forKey: [infos objectForKey: @"uid"]];
}
}
else
prefetchedInfos = nil;