diff --git a/ChangeLog b/ChangeLog index 5fa4a694f..b74ff0799 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-06-17 Wolfgang Sourdeau + + * SoObjects/SOGo/SOGoParentFolder.m (-initSubFoldersMatching:): + renamed from "initSubFolders". Take a string argument that, if + specified, will stop the search of folders when the name can be + found in the folders list. + 2009-06-16 Wolfgang Sourdeau * SoObjects/Appointments/SOGoAppointmentFolder.m diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index 4d9eaec8e..1e8f7df58 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -336,7 +336,7 @@ static SoSecurityManager *sm = nil; return error; } -- (NSException *) initSubFolders +- (NSException *) initSubFoldersMatching: (NSString *) folderName { NSString *login; NSException *error; @@ -345,10 +345,12 @@ static SoSecurityManager *sm = nil; { subFolders = [NSMutableDictionary new]; error = [self appendPersonalSources]; - if (!error) + if (!error + && !(folderName && [subFolders objectForKey: folderName])) { error = [self appendSystemSources]; - if (!error) + if (!error + && !(folderName && [subFolders objectForKey: folderName])) { login = [[context activeUser] login]; if ([login isEqualToString: owner]) @@ -394,7 +396,7 @@ static SoSecurityManager *sm = nil; if (!obj) { if (!subFolders) - error = [self initSubFolders]; + error = [self initSubFoldersMatching: name]; else error = nil; @@ -421,7 +423,7 @@ static SoSecurityManager *sm = nil; if (!subFolders) { - error = [self initSubFolders]; + error = [self initSubFoldersMatching: nil]; if (error) { /* We exceptionnally raise the exception here because doPROPFIND: