See ChangeLog

Monotone-Parent: 60ea6e18203007e12287f19ec553de192b334dd6
Monotone-Revision: 4a2acb99fffd2f82c148ae17571304c2d05b9fba

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2011-05-05T18:34:13
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte
2011-05-05 18:34:13 +00:00
parent c9a69a76a7
commit f78bdb7150
2 changed files with 28 additions and 10 deletions
+21 -10
View File
@@ -133,18 +133,29 @@
// to the full name of the person.
if (otherUsersFolderName && [currentFolder hasPrefix: otherUsersFolderName])
{
// We have a string like /Other Users/lmarcotte/...
// We have a string like /Other Users/lmarcotte/... under Cyrus, but we could
// also have something like /shared under Dovecot. So we swap the username only
// if we have one, of course.
pathComponents = [NSMutableArray arrayWithArray: [currentFolder pathComponents]];
login = [pathComponents objectAtIndex: 2];
userManager = [SOGoUserManager sharedUserManager];
fullName = [userManager getCNForUID: login];
[pathComponents removeObjectsInRange: NSMakeRange(0,3)];
currentDisplayName = [NSString stringWithFormat: @"/%@/%@/%@",
[self labelForKey: @"OtherUsersFolderName"],
(fullName != nil ? fullName : login),
[pathComponents componentsJoinedByString: @"/"]];
if ([pathComponents count] > 2)
{
login = [pathComponents objectAtIndex: 2];
userManager = [SOGoUserManager sharedUserManager];
fullName = [userManager getCNForUID: login];
[pathComponents removeObjectsInRange: NSMakeRange(0,3)];
currentDisplayName = [NSString stringWithFormat: @"/%@/%@/%@",
[self labelForKey: @"OtherUsersFolderName"],
(fullName != nil ? fullName : login),
[pathComponents componentsJoinedByString: @"/"]];
}
else
{
currentDisplayName = [NSString stringWithFormat: @"/%@%@", [self labelForKey: @"OtherUsersFolderName"],
[currentFolder substringFromIndex: [otherUsersFolderName length]]];
}
}
else if (sharedFoldersName && [currentFolder hasPrefix: sharedFoldersName])
currentDisplayName = [NSString stringWithFormat: @"/%@%@", [self labelForKey: @"SharedFoldersName"],