Monotone-Parent: ad417bdf1bec487a4e724865914dd8c70bb16db5

Monotone-Revision: 4f36a1c10a12396aed17d84ab4be1adc520d1663

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-11-20T15:48:18
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2011-11-20 15:48:18 +00:00
parent 86f278fd77
commit fcd033397a
4 changed files with 27 additions and 44 deletions

View File

@@ -1,5 +1,19 @@
2011-11-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreFolder.m (-lookupFolder:): explicitly set
the MAPIStoreContext's woContext as context to the looked up
folder, although one could expect it to have been set during the
lookup at the SOGo level...
* OpenChange/MAPIStoreFSFolder.m (-lookupFolder:): removed useless
overriding of method.
* OpenChange/MAPIStoreMailFolder.m (-[MAPIStoreMailFolder
lookupFolder:]): removed useless overriding of method.
(-[MAPIStoreInboxFolder lookupFolder:]): in altnamespace mode,
perform the same association of the woContext to the looked up
folder as in MAPIStoreFolder.
* OpenChange/MAPIStoreContext.m
(-initFromURL:withConnectionInfo:andTDBIndexing:): instantiate a
SOGoUser corresponding to the username of the new context and

View File

@@ -149,23 +149,6 @@ static Class EOKeyValueQualifierK;
return entries;
}
- (id) lookupFolder: (NSString *) childKey
{
id childObject = nil;
SOGoMAPIFSFolder *childFolder;
[self folderKeys];
if ([folderKeys containsObject: childKey])
{
childFolder = [sogoObject lookupName: childKey inContext: nil
acquire: NO];
childObject = [MAPIStoreFSFolder mapiStoreObjectWithSOGoObject: childFolder
inContainer: self];
}
return childObject;
}
- (NSDate *) lastMessageModificationTime
{
NSUInteger count, max;

View File

@@ -189,6 +189,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
sogoFolder = [sogoObject lookupName: folderKey
inContext: woContext
acquire: NO];
[sogoFolder setContext: woContext];
if (sogoFolder && ![sogoFolder isKindOfClass: NSExceptionK])
childFolder = [isa mapiStoreObjectWithSOGoObject: sogoFolder
inContainer: self];

View File

@@ -351,23 +351,6 @@ static Class SOGoMailFolderK;
return subfolderKeys;
}
- (id) lookupFolder: (NSString *) childKey
{
id childObject = nil;
SOGoMailFolder *childFolder;
[self folderKeys];
if ([folderKeys containsObject: childKey])
{
childFolder = [sogoObject lookupName: childKey inContext: nil
acquire: NO];
childObject = [MAPIStoreMailFolder mapiStoreObjectWithSOGoObject: childFolder
inContainer: self];
}
return childObject;
}
- (NSDate *) creationTime
{
return [NSCalendarDate dateWithTimeIntervalSince1970: 0x4dbb2dbe]; /* oc_version_time */
@@ -1168,26 +1151,28 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
- (id) lookupFolder: (NSString *) childKey
{
id childObject = nil;
MAPIStoreMailFolder *childFolder = nil;
SOGoMailAccount *account;
SOGoMailFolder *childFolder;
SOGoMailFolder *sogoFolder;
WOContext *woContext;
if (usesAltNameSpace)
{
[self folderKeys];
if ([folderKeys containsObject: childKey])
if ([[self folderKeys] containsObject: childKey])
{
woContext = [[self context] woContext];
account = [(SOGoMailFolder *) sogoObject mailAccountFolder];
childFolder = [account lookupName: childKey inContext: nil
acquire: NO];
childObject = [MAPIStoreMailFolder mapiStoreObjectWithSOGoObject: childFolder
inContainer: self];
sogoFolder = [account lookupName: childKey inContext: woContext
acquire: NO];
[sogoFolder setContext: woContext];
childFolder = [MAPIStoreMailFolder mapiStoreObjectWithSOGoObject: sogoFolder
inContainer: self];
}
}
else
childObject = [super lookupFolder: childKey];
childFolder = [super lookupFolder: childKey];
return childObject;
return childFolder;
}
@end