Remove listRequiresDot option from *Source classes

This option is not needed. SQLSource was not using it
and LDAPSource will transform the filter to (UIDField=*) when
there is nothing set as filter, before this patch it was needed
to either insert '.' as filter or set listRequiresDot to NO
This commit is contained in:
Jesús García Sáez
2016-01-20 11:01:27 +01:00
parent 169356b8a0
commit 6b2ec7a2e7
5 changed files with 28 additions and 77 deletions
+9 -20
View File
@@ -353,26 +353,15 @@
NSArray *records, *result;
EOSortOrdering *ordering;
result = nil;
if (([filter length] > 0 && [criteria isEqualToString: @"name_or_address"])
|| ![source listRequiresDot])
{
records = [source fetchContactsMatching: filter
inDomain: domain];
[childRecords setObjects: records
forKeys: [records objectsForKey: @"c_name"
notFoundMarker: nil]];
records = [self _flattenedRecords: records];
ordering
= [EOSortOrdering sortOrderingWithKey: sortKey
selector: ((sortOrdering == NSOrderedDescending)
? EOCompareCaseInsensitiveDescending
: EOCompareCaseInsensitiveAscending)];
result
= [records sortedArrayUsingKeyOrderArray:
[NSArray arrayWithObject: ordering]];
}
records = [source fetchContactsMatching: filter inDomain: domain];
[childRecords setObjects: records forKeys: [records objectsForKey: @"c_name"
notFoundMarker: nil]];
records = [self _flattenedRecords: records];
ordering = [EOSortOrdering sortOrderingWithKey: sortKey
selector: ((sortOrdering == NSOrderedDescending)
? EOCompareCaseInsensitiveDescending
: EOCompareCaseInsensitiveAscending)];
result = [records sortedArrayUsingKeyOrderArray: [NSArray arrayWithObject: ordering]];
return result;
}