Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2020-12-12 02:25:10 +0300
committerArthur Schiwon <blizzz@arthur-schiwon.de>2020-12-15 13:53:39 +0300
commitd8ad4ef6b5fc038e8187dc285925cd1a0d7fb5bf (patch)
tree2ecbc4bf0bcd0737f7cf57ecb6bbee22982a1928 /apps/files_sharing/lib
parent2b017b704a4a49801bc09774a1a17cfedca9cc7e (diff)
use a consistent default value for sharing.maxAutocompleteResults
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/Controller/ShareesAPIController.php3
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);
}