diff --git a/ChangeLog b/ChangeLog index 3e6710a79..b5d16ea76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-11-24 Wolfgang Sourdeau + + * SoObjects/SOGo/SOGoParentFolder.m ([SOGoParentFolder + -toManyRelationshipKeys]): return the subfolders in the order by + which they appear in the web interface, to avoid confusing + Lighting with its Inbox management and so that the folders appear + in an ordered way. + 2008-11-23 Wolfgang Sourdeau * UI/MainUI/SOGoUserHomePage.m ([SOGoUserHomePage diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index b3cb6bc69..c760701eb 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -349,14 +349,6 @@ static SoSecurityManager *sm = nil; return obj; } -- (NSArray *) toManyRelationshipKeys -{ - if (!subFolders) - [self initSubFolders]; - - return [subFolders allKeys]; -} - - (NSArray *) subFolders { if (!subFolders) @@ -366,6 +358,20 @@ static SoSecurityManager *sm = nil; sortedArrayUsingSelector: @selector (compare:)]; } +- (NSArray *) toManyRelationshipKeys +{ + NSEnumerator *sortedSubFolders; + NSMutableArray *keys; + SOGoGCSFolder *currentFolder; + + keys = [NSMutableArray array]; + sortedSubFolders = [[self subFolders] objectEnumerator]; + while ((currentFolder = [sortedSubFolders nextObject])) + [keys addObject: [currentFolder nameInContainer]]; + + return keys; +} + - (NSException *) davCreateCollection: (NSString *) pathInfo inContext: (WOContext *) localContext {