From c8b0c3321ef776c4a26d36b540d0c6cf8d4dc084 Mon Sep 17 00:00:00 2001 From: Hivert Quentin Date: Tue, 12 Nov 2024 15:24:06 +0100 Subject: [PATCH] fix last commit --- SoObjects/SOGo/LDAPSource.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SoObjects/SOGo/LDAPSource.m b/SoObjects/SOGo/LDAPSource.m index 7c0259554..72640141d 100644 --- a/SoObjects/SOGo/LDAPSource.m +++ b/SoObjects/SOGo/LDAPSource.m @@ -1429,12 +1429,13 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses NSMutableArray *contacts; EOQualifier *qualifier; unsigned int i; + NSMutableString *s; NSString *sortAttribute; BOOL sortReverse; contacts = [NSMutableArray array]; - if(theDomain) + if(theDomain != nil && [theDomain length] > 0) { if ([_baseDN rangeOfString: @"%d"].location != NSNotFound) { @@ -2300,8 +2301,7 @@ _makeLDAPChanges (NGLdapConnection *ldapConnection, NSRange r; r = [theLogin rangeOfString: @"@"]; - if (r.location != NSNotFound && - [_pristineBaseDN rangeOfString: @"%d"].location != NSNotFound) + if (r.location != NSNotFound && [_pristineBaseDN rangeOfString: @"%d"].location != NSNotFound) { s = [NSMutableString stringWithString: _pristineBaseDN]; [s replaceOccurrencesOfString: @"%d" withString: [theLogin substringFromIndex: r.location+1] options: 0 range: NSMakeRange(0, [s length])];