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/files_sharing/lib/Controller/ShareesAPIController.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/files_sharing/lib/Controller/ShareesAPIController.php')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareesAPIController.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index a2b39b40772..70f016d81f2 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -36,6 +36,7 @@ declare(strict_types=1); namespace OCA\Files_Sharing\Controller; +use OCP\Constants; use function array_slice; use function array_values; use Generator; @@ -148,7 +149,7 @@ class ShareesAPIController extends OCSController { } // never return more than the max. number of results configured in the config.php - $maxResults = (int)$this->config->getSystemValue('sharing.maxAutocompleteResults', 0); + $maxResults = $this->config->getSystemValueInt('sharing.maxAutocompleteResults', Constants::SHARING_MAX_AUTOCOMPLETE_RESULTS_DEFAULT); if ($maxResults > 0) { $perPage = min($perPage, $maxResults); } |