fix(addressbook): Removed SOGoGlobalAddressBookFirstEntries (use listRequiresDot instead) and move SOGoGlobalAddressBookFirstEntriesCount to globalAddressBookFirstEntriesCount in source scope. This fixed the broken listRequiresDot in 5.10

This commit is contained in:
smizrahi committed 2024-02-26 15:40:49 +01:00
1 parent 776a798e17
commit 4dba56f70d
9 files changed
+67 -62

No files matched your search

+1
View File
@@ -64,6 +64,7 @@
NSArray *_bindFields;
BOOL _listRequiresDot;
int _globalAddressBookFirstEntriesCount;
NSString *_domain;
NSString *_contactInfoAttribute;
+17 -1
View File
@@ -106,6 +106,7 @@ static Class NSStringK;
_filter = nil;
_userPasswordAlgorithm = nil;
_listRequiresDot = YES;
_globalAddressBookFirstEntriesCount = -1;
_passwordPolicy = NO;
_updateSambaNTLMPasswords = NO;
@@ -200,10 +201,15 @@ static Class NSStringK;
andMultipleBookingsField: [udSource objectForKey: @"MultipleBookingsFieldName"]];
dotValue = [udSource objectForKey: @"listRequiresDot"];
if (dotValue)
if (dotValue) {
[self setListRequiresDot: [dotValue boolValue]];
if ([udSource objectForKey: @"globalAddressBookFirstEntriesCount"])
[self setGlobalAddressBookFirstEntriesCount: [[udSource objectForKey: @"globalAddressBookFirstEntriesCount"] intValue]];
}
[self setContactMapping: [udSource objectForKey: @"mapping"]
andObjectClasses: [udSource objectForKey: @"objectClasses"]];
[self setModifiers: [udSource objectForKey: @"modifiers"]];
ASSIGN(_abOU, [udSource objectForKey: @"abOU"]);
@@ -400,6 +406,16 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
return _listRequiresDot;
}
- (void) setGlobalAddressBookFirstEntriesCount: (int)value
{
_globalAddressBookFirstEntriesCount = value;
}
- (int) globalAddressBookFirstEntriesCount
{
return _globalAddressBookFirstEntriesCount;
}
- (NSArray *) searchFields
{
return _searchFields;
+2
View File
@@ -49,6 +49,8 @@
/* requires a "." to obtain the full list of contacts */
- (void) setListRequiresDot: (BOOL) aBool;
- (BOOL) listRequiresDot;
- (void) setGlobalAddressBookFirstEntriesCount: (int)value;
- (int) globalAddressBookFirstEntriesCount;
- (BOOL) checkLogin: (NSString *) _login
password: (NSString *) _pwd
-3
View File
@@ -135,9 +135,6 @@ NSComparisonResult languageSort(id el1, id el2, void *context);
- (NSArray *) disableSharingAnyAuthUser;
- (NSArray *) disableExport;
- (BOOL) enableGlobalAddressBookFirstEntries;
- (int) globalAddressBookFirstEntriesCount;
- (BOOL)isURLEncryptionEnabled;
- (NSString *)urlEncryptionPassphrase;
-17
View File
@@ -917,21 +917,4 @@ NSComparisonResult languageSort(id el1, id el2, void *context)
return disableExport;
}
- (BOOL) globalAddressBookFirstEntriesEnabled
{
return [self boolForKey: @"SOGoGlobalAddressBookFirstEntries"];
}
- (int) globalAddressBookFirstEntriesCount
{
int v;
v = [self integerForKey: @"SOGoGlobalAddressBookFirstEntriesCount"];
if (!v)
v = 100;
return v;
}
@end
+1
View File
@@ -52,6 +52,7 @@
NSString *_multipleBookingsField;
BOOL _listRequiresDot;
int _globalAddressBookFirstEntriesCount;
NSDictionary *_modulesConstraints;
}
+16 -1
View File
@@ -108,6 +108,7 @@
_imapHostField = nil;
_sieveHostField = nil;
_listRequiresDot = YES;
_globalAddressBookFirstEntriesCount = -1;
_modulesConstraints = nil;
}
@@ -170,8 +171,12 @@
_viewURL = [[NSURL alloc] initWithString: [udSource objectForKey: @"viewURL"]];
dotValue = [udSource objectForKey: @"listRequiresDot"];
if (dotValue)
if (dotValue) {
[self setListRequiresDot: [dotValue boolValue]];
if ([udSource objectForKey: @"globalAddressBookFirstEntriesCount"])
[self setGlobalAddressBookFirstEntriesCount: [[udSource objectForKey: @"globalAddressBookFirstEntriesCount"] intValue]];
}
#warning this domain code has no effect yet
if ([sourceDomain length])
@@ -1156,6 +1161,16 @@
return _listRequiresDot;
}
- (void) setGlobalAddressBookFirstEntriesCount: (int)value
{
_globalAddressBookFirstEntriesCount = value;
}
- (int) globalAddressBookFirstEntriesCount
{
return _globalAddressBookFirstEntriesCount;
}
/* card editing */
- (void) setModifiers: (NSArray *) newModifiers
{