summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Collaboration/Collaborators/MailPlugin.php10
-rw-r--r--lib/private/ContactsManager.php1
-rw-r--r--lib/public/Contacts/IManager.php1
-rw-r--r--lib/public/IAddressBook.php1
4 files changed, 12 insertions, 1 deletions
diff --git a/lib/private/Collaboration/Collaborators/MailPlugin.php b/lib/private/Collaboration/Collaborators/MailPlugin.php
index 7245501a8bf..59861247ced 100644
--- a/lib/private/Collaboration/Collaborators/MailPlugin.php
+++ b/lib/private/Collaboration/Collaborators/MailPlugin.php
@@ -101,7 +101,15 @@ class MailPlugin implements ISearchPlugin {
$emailType = new SearchResultType('emails');
// Search in contacts
- $addressBookContacts = $this->contactsManager->search($search, ['EMAIL', 'FN'], ['limit' => $limit, 'offset' => $offset]);
+ $addressBookContacts = $this->contactsManager->search(
+ $search,
+ ['EMAIL', 'FN'],
+ [
+ 'limit' => $limit,
+ 'offset' => $offset,
+ 'wildcard' => $this->shareeEnumeration,
+ ]
+ );
$lowerSearch = strtolower($search);
foreach ($addressBookContacts as $contact) {
if (isset($contact['EMAIL'])) {
diff --git a/lib/private/ContactsManager.php b/lib/private/ContactsManager.php
index e702a439153..7bdb8293857 100644
--- a/lib/private/ContactsManager.php
+++ b/lib/private/ContactsManager.php
@@ -42,6 +42,7 @@ class ContactsManager implements IManager {
* - 'escape_like_param' - If set to false wildcards _ and % are not escaped
* - 'limit' - Set a numeric limit for the search results
* - 'offset' - Set the offset for the limited search results
+ * - 'wildcard' - Whether the search should use wildcards
* @return array an array of contacts which are arrays of key-value-pairs
*/
public function search($pattern, $searchProperties = [], $options = []) {
diff --git a/lib/public/Contacts/IManager.php b/lib/public/Contacts/IManager.php
index 8d24249e997..6bf569e9bbd 100644
--- a/lib/public/Contacts/IManager.php
+++ b/lib/public/Contacts/IManager.php
@@ -93,6 +93,7 @@ interface IManager {
* - 'escape_like_param' - If set to false wildcards _ and % are not escaped
* - 'limit' - Set a numeric limit for the search results
* - 'offset' - Set the offset for the limited search results
+ * - 'wildcard' - Whether the search should use wildcards
* @return array an array of contacts which are arrays of key-value-pairs
* @since 6.0.0
*/
diff --git a/lib/public/IAddressBook.php b/lib/public/IAddressBook.php
index b0196764be3..738745376d3 100644
--- a/lib/public/IAddressBook.php
+++ b/lib/public/IAddressBook.php
@@ -67,6 +67,7 @@ namespace OCP {
* - 'escape_like_param' - If set to false wildcards _ and % are not escaped
* - 'limit' - Set a numeric limit for the search results
* - 'offset' - Set the offset for the limited search results
+ * - 'wildcard' - Whether the search should use wildcards
* @return array an array of contacts which are arrays of key-value-pairs
* example result:
* [