minor improvement from previous commit

Monotone-Parent: 5b741965d2e2101564907ff80f19b932fae6f8d1
Monotone-Revision: 9133720ea3f2757b19bd8237339c0ee204f7f485

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2011-04-21T16:07:03
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte
2011-04-21 16:07:03 +00:00
parent 359bc181d7
commit d9df05f4b2

View File

@@ -115,7 +115,7 @@
- (NSArray *) _jsonFolders: (NSEnumerator *) rawFolders
{
NSString *currentFolder, *currentDisplayName, *currentFolderType, *login;
NSString *currentFolder, *currentDisplayName, *currentFolderType, *login, *fullName;
NSMutableArray *pathComponents;
SOGoUserManager *userManager;
NSDictionary *folderData;
@@ -135,11 +135,12 @@
pathComponents = [NSMutableArray arrayWithArray: [currentFolder pathComponents]];
login = [pathComponents objectAtIndex: 2];
userManager = [SOGoUserManager sharedUserManager];
fullName = [userManager getCNForUID: login];
[pathComponents removeObjectsInRange: NSMakeRange(0,1)];
currentDisplayName = [NSString stringWithFormat: @"/%@/%@/%@",
[self labelForKey: @"OtherUsersFolderName"],
[userManager getCNForUID: login],
(fullName != nil ? fullName : login),
[pathComponents componentsJoinedByString: @"/"]];
}