Improved error message when misconfiguring the SOGoLDAPSources.
Monotone-Parent: 24fe8bbb9b61c347ef798b9f6e888d08bf6aa660 Monotone-Revision: 49bc68e8b74862055ad4e2b93e3b0c4b0e791801 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2008-10-22T20:50:27 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
2ec29054e9
commit
42e149a3b2
|
@ -111,16 +111,21 @@ static BOOL forceImapLoginWithEmail = NO;
|
||||||
|
|
||||||
- (void) _prepareLDAPSourcesWithDefaults: (NSUserDefaults *) ud
|
- (void) _prepareLDAPSourcesWithDefaults: (NSUserDefaults *) ud
|
||||||
{
|
{
|
||||||
NSArray *udSources;
|
id udSources;
|
||||||
unsigned int count, max;
|
unsigned int count, max;
|
||||||
|
|
||||||
sources = [NSMutableDictionary new];
|
sources = [NSMutableDictionary new];
|
||||||
sourcesMetadata = [NSMutableDictionary new];
|
sourcesMetadata = [NSMutableDictionary new];
|
||||||
|
|
||||||
udSources = [ud arrayForKey: @"SOGoLDAPSources"];
|
udSources = [ud arrayForKey: @"SOGoLDAPSources"];
|
||||||
max = [udSources count];
|
|
||||||
for (count = 0; count < max; count++)
|
if (udSources && [udSources isKindOfClass: [NSArray class]]) {
|
||||||
[self _registerSource: [udSources objectAtIndex: count]];
|
max = [udSources count];
|
||||||
|
for (count = 0; count < max; count++)
|
||||||
|
[self _registerSource: [udSources objectAtIndex: count]];
|
||||||
|
} else {
|
||||||
|
[self errorWithFormat: @"SOGoLDAPSources is not defined or it is not an array. Check your defaults."];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) init
|
- (id) init
|
||||||
|
|
Loading…
Reference in a new issue