summaryrefslogtreecommitdiffstats
path: root/lib/private/Contacts
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2020-12-12 00:25:10 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2020-12-15 11:53:39 +0100
commitd8ad4ef6b5fc038e8187dc285925cd1a0d7fb5bf (patch)
tree2ecbc4bf0bcd0737f7cf57ecb6bbee22982a1928 /lib/private/Contacts
parent2b017b704a4a49801bc09774a1a17cfedca9cc7e (diff)
downloadnextcloud-server-d8ad4ef6b5fc038e8187dc285925cd1a0d7fb5bf.tar.gz
nextcloud-server-d8ad4ef6b5fc038e8187dc285925cd1a0d7fb5bf.zip
use a consistent default value for sharing.maxAutocompleteResults
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private/Contacts')
-rw-r--r--lib/private/Contacts/ContactsMenu/Manager.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Contacts/ContactsMenu/Manager.php b/lib/private/Contacts/ContactsMenu/Manager.php
index 8f772b8e027..d08db5775e5 100644
--- a/lib/private/Contacts/ContactsMenu/Manager.php
+++ b/lib/private/Contacts/ContactsMenu/Manager.php
@@ -27,6 +27,7 @@
namespace OC\Contacts\ContactsMenu;
use OCP\App\IAppManager;
+use OCP\Constants;
use OCP\Contacts\ContactsMenu\IEntry;
use OCP\IConfig;
use OCP\IUser;
@@ -63,7 +64,7 @@ class Manager {
* @return array
*/
public function getEntries(IUser $user, $filter) {
- $maxAutocompleteResults = $this->config->getSystemValueInt('sharing.maxAutocompleteResults', 25);
+ $maxAutocompleteResults = max(0, $this->config->getSystemValueInt('sharing.maxAutocompleteResults', Constants::SHARING_MAX_AUTOCOMPLETE_RESULTS_DEFAULT));
$minSearchStringLength = $this->config->getSystemValueInt('sharing.minSearchStringLength', 0);
$topEntries = [];
if (strlen($filter) >= $minSearchStringLength) {