summaryrefslogtreecommitdiffstats
path: root/core/Controller
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2017-10-27 13:50:38 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2017-10-27 13:50:38 +0200
commitca72c0150b3ea490c06c8c4824aebf0d0da33088 (patch)
tree19ee5efb85bcf2a97e60b0372320df129ac0f447 /core/Controller
parentbd951e926f7913568257f321f2894dfcc66aa3b3 (diff)
downloadnextcloud-server-ca72c0150b3ea490c06c8c4824aebf0d0da33088.tar.gz
nextcloud-server-ca72c0150b3ea490c06c8c4824aebf0d0da33088.zip
configurable amount of autocomplete results in comments
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/AutoCompleteController.php4
1 files changed, 2 insertions, 2 deletions
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