From 7c56283c3ccb8f6d6ca6eeefd44a3db15d134da2 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 30 Jul 2020 12:50:04 +0200 Subject: contactsmanager shall limit number of results early Signed-off-by: Arthur Schiwon --- lib/private/Contacts/ContactsMenu/Manager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/Contacts/ContactsMenu/Manager.php') 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); -- cgit v1.2.3