From ca72c0150b3ea490c06c8c4824aebf0d0da33088 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 27 Oct 2017 13:50:38 +0200 Subject: configurable amount of autocomplete results in comments Signed-off-by: Arthur Schiwon --- core/Controller/AutoCompleteController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/Controller/AutoCompleteController.php') diff --git a/core/Controller/AutoCompleteController.php b/core/Controller/AutoCompleteController.php index 30b08e42503..1ed326fb3ef 100644 --- a/core/Controller/AutoCompleteController.php +++ b/core/Controller/AutoCompleteController.php @@ -61,12 +61,12 @@ class AutoCompleteController extends Controller { * @param string $itemId * @param string|null $sorter can be piped, top prio first, e.g.: "commenters|share-recipients" * @param array $shareTypes + * @param int $limit * @return DataResponse */ - public function get($search, $itemType, $itemId, $sorter = null, $shareTypes = [Share::SHARE_TYPE_USER]) { + public function get($search, $itemType, $itemId, $sorter = null, $shareTypes = [Share::SHARE_TYPE_USER], $limit = 10) { // if enumeration/user listings are disabled, we'll receive an empty // result from search() – thus nothing else to do here. - $limit = $this->config->getSystemValue('collaboration.maxAutocompleteResults', 50); list($results,) = $this->collaboratorSearch->search($search, $shareTypes, false, $limit, 0); // there won't be exact matches without a search string -- cgit v1.2.3