mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(mail): ContactManager search with fullmatch
Signed-off-by: Johannes Merkel <mail@johannesgge.de>
This commit is contained in:
parent
7d851fb3e2
commit
846754ed1a
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