diff --git a/ChangeLog b/ChangeLog index b63b818dc..11999e6a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,9 @@ * Documentation/SOGo Installation Guide.odt Updated to set WOUseRelativeURLs to YES instead of NO by default. + * We now correctly lowercase the SOGoLDAPContactInfoAttribute + attribute everywhere. + 2009-10-26 Francis Lachapelle diff --git a/SoObjects/Contacts/SOGoContactLDIFEntry.m b/SoObjects/Contacts/SOGoContactLDIFEntry.m index c775be1eb..e2d7008c0 100644 --- a/SoObjects/Contacts/SOGoContactLDIFEntry.m +++ b/SoObjects/Contacts/SOGoContactLDIFEntry.m @@ -162,7 +162,7 @@ static NSString *sogoContactInfoAttribute = nil; /* If SOGoLDAPContactInfoAttribute is defined, we set as the NOTE value in order for Thunderbird (or any other CardDAV client) to display it. */ if (sogoContactInfoAttribute) - key = sogoContactInfoAttribute; + key = [sogoContactInfoAttribute lowercaseString]; else key = @"description"; info = [ldifEntry objectForKey: key]; diff --git a/SoObjects/Contacts/SOGoContactSourceFolder.m b/SoObjects/Contacts/SOGoContactSourceFolder.m index 83fa114e2..20cb37d7c 100644 --- a/SoObjects/Contacts/SOGoContactSourceFolder.m +++ b/SoObjects/Contacts/SOGoContactSourceFolder.m @@ -257,7 +257,7 @@ if (data) [newRecord setObject: data forKey: @"isGroup"]; - contactInfo = [ud stringForKey: @"SOGoLDAPContactInfoAttribute"]; + contactInfo = [[ud stringForKey: @"SOGoLDAPContactInfoAttribute"] lowercaseString]; if ([contactInfo length] > 0) { data = [oldRecord objectForKey: contactInfo]; if ([data length] > 0) diff --git a/SoObjects/SOGo/SOGoUserFolder.m b/SoObjects/SOGo/SOGoUserFolder.m index e55f8bce9..52ca6b177 100644 --- a/SoObjects/SOGo/SOGoUserFolder.m +++ b/SoObjects/SOGo/SOGoUserFolder.m @@ -71,7 +71,7 @@ static NSString *LDAPContactInfoAttribute = nil; { ud = [NSUserDefaults standardUserDefaults]; LDAPContactInfoAttribute - = [ud stringForKey: @"SOGoLDAPContactInfoAttribute"]; + = [[ud stringForKey: @"SOGoLDAPContactInfoAttribute"] lowercaseString]; [LDAPContactInfoAttribute retain]; } } diff --git a/SoObjects/SOGo/SOGoUserManager.m b/SoObjects/SOGo/SOGoUserManager.m index fdeedc50a..0640083d0 100644 --- a/SoObjects/SOGo/SOGoUserManager.m +++ b/SoObjects/SOGo/SOGoUserManager.m @@ -68,7 +68,7 @@ static NSLock *lock = nil; defaultMailDomain = @"localhost"; } - LDAPContactInfoAttribute = [ud stringForKey: @"SOGoLDAPContactInfoAttribute"]; + LDAPContactInfoAttribute = [[ud stringForKey: @"SOGoLDAPContactInfoAttribute"] lowercaseString]; [LDAPContactInfoAttribute retain]; } if (!forceImapLoginWithEmail) diff --git a/UI/Contacts/UIxContactFoldersView.m b/UI/Contacts/UIxContactFoldersView.m index 9d2c95e4f..0820309ed 100644 --- a/UI/Contacts/UIxContactFoldersView.m +++ b/UI/Contacts/UIxContactFoldersView.m @@ -150,7 +150,7 @@ if ([results count] > 0) { sud = [NSUserDefaults standardUserDefaults]; - infoKey = [sud stringForKey: @"SOGoLDAPContactInfoAttribute"]; + infoKey = [[sud stringForKey: @"SOGoLDAPContactInfoAttribute"] lowercaseString]; contacts = [results objectEnumerator]; contact = [contacts nextObject]; while (contact) diff --git a/UI/MainUI/SOGoUserHomePage.m b/UI/MainUI/SOGoUserHomePage.m index 68ff46094..ce8943799 100644 --- a/UI/MainUI/SOGoUserHomePage.m +++ b/UI/MainUI/SOGoUserHomePage.m @@ -340,7 +340,7 @@ static NSString *LDAPContactInfoAttribute = nil; { if ([LDAPContactInfoAttribute length]) { - contactInfo = [contact objectForKey: LDAPContactInfoAttribute]; + contactInfo = [contact objectForKey: [LDAPContactInfoAttribute lowercaseString]]; if (!contactInfo) contactInfo = @""; }