diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-12-12 00:25:10 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-12-15 11:53:39 +0100 |
commit | d8ad4ef6b5fc038e8187dc285925cd1a0d7fb5bf (patch) | |
tree | 2ecbc4bf0bcd0737f7cf57ecb6bbee22982a1928 /apps/dav/lib/DAV/GroupPrincipalBackend.php | |
parent | 2b017b704a4a49801bc09774a1a17cfedca9cc7e (diff) | |
download | nextcloud-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 'apps/dav/lib/DAV/GroupPrincipalBackend.php')
-rw-r--r-- | apps/dav/lib/DAV/GroupPrincipalBackend.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/dav/lib/DAV/GroupPrincipalBackend.php b/apps/dav/lib/DAV/GroupPrincipalBackend.php index 747976b6ad3..8b9c5aa9488 100644 --- a/apps/dav/lib/DAV/GroupPrincipalBackend.php +++ b/apps/dav/lib/DAV/GroupPrincipalBackend.php @@ -27,6 +27,7 @@ namespace OCA\DAV\DAV; +use OCP\Constants; use OCP\IConfig; use OCP\IGroup; use OCP\IGroupManager; @@ -212,7 +213,10 @@ class GroupPrincipalBackend implements BackendInterface { $restrictGroups = $this->groupManager->getUserGroupIds($user); } - $searchLimit = $this->config->getSystemValue('sharing.maxAutocompleteResults', null); + $searchLimit = $this->config->getSystemValueInt('sharing.maxAutocompleteResults', Constants::SHARING_MAX_AUTOCOMPLETE_RESULTS_DEFAULT); + if ($searchLimit <= 0) { + $searchLimit = null; + } foreach ($searchProperties as $prop => $value) { switch ($prop) { case '{DAV:}displayname': |