mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Merge pull request #39450 from nextcloud/backport/38907/stable26
[stable26] Fix: ContactManager search with fullmatch
This commit is contained in:
commit
1f206dc22a
1 changed files with 6 additions and 3 deletions
|
|
@ -58,15 +58,18 @@ class ContactsManager implements IManager {
|
|||
$strictSearch = array_key_exists('strict_search', $options) && $options['strict_search'] === true;
|
||||
|
||||
if ($addressBook->isSystemAddressBook()) {
|
||||
$enumeration = !\array_key_exists('enumeration', $options) || $options['enumeration'] !== false;
|
||||
$fullMatch = !\array_key_exists('fullmatch', $options) || $options['fullmatch'] !== false;
|
||||
if (!$fullMatch) {
|
||||
// Neither full match is allowed, so skip the system address book
|
||||
|
||||
if (!$enumeration && !$fullMatch) {
|
||||
// No access to system address book AND no full match allowed
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($strictSearch) {
|
||||
$searchOptions['wildcard'] = false;
|
||||
} else {
|
||||
$searchOptions['wildcard'] = !\array_key_exists('enumeration', $options) || $options['enumeration'] !== false;
|
||||
$searchOptions['wildcard'] = $enumeration;
|
||||
}
|
||||
} else {
|
||||
$searchOptions['wildcard'] = !$strictSearch;
|
||||
|
|
|
|||
Loading…
Reference in a new issue