aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Contacts/ContactsMenu/Manager.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2020-07-30 12:50:04 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2020-07-31 12:42:17 +0200
commit7c56283c3ccb8f6d6ca6eeefd44a3db15d134da2 (patch)
tree8c54fc760c509f26ddd67d265d115387cd20ae04 /lib/private/Contacts/ContactsMenu/Manager.php
parenta32e6a795868f4d26983b26502d2588b3e6fd80e (diff)
downloadnextcloud-server-7c56283c3ccb8f6d6ca6eeefd44a3db15d134da2.tar.gz
nextcloud-server-7c56283c3ccb8f6d6ca6eeefd44a3db15d134da2.zip
contactsmanager shall limit number of results early
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private/Contacts/ContactsMenu/Manager.php')
-rw-r--r--lib/private/Contacts/ContactsMenu/Manager.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Contacts/ContactsMenu/Manager.php b/lib/private/Contacts/ContactsMenu/Manager.php
index 293f1366b05..c3d4e74e433 100644
--- a/lib/private/Contacts/ContactsMenu/Manager.php
+++ b/lib/private/Contacts/ContactsMenu/Manager.php
@@ -66,7 +66,7 @@ class Manager {
$minSearchStringLength = $this->config->getSystemValueInt('sharing.minSearchStringLength', 0);
$topEntries = [];
if (strlen($filter) >= $minSearchStringLength) {
- $entries = $this->store->getContacts($user, $filter);
+ $entries = $this->store->getContacts($user, $filter, $maxAutocompleteResults);
$sortedEntries = $this->sortEntries($entries);
$topEntries = array_slice($sortedEntries, 0, $maxAutocompleteResults);