aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/TemplateLayout.php
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-12-17 08:36:36 +0100
committerJulius Härtl <jus@bitgrid.net>2022-04-13 10:05:55 +0200
commit93eb584199714883cdb75d5db77fc07bb06e56a3 (patch)
treebc1e20e89357911b3c1cf992528f15a067845d39 /lib/private/TemplateLayout.php
parentde7280114a501eb8568cf4c0a1c85d5561f76648 (diff)
downloadnextcloud-server-93eb584199714883cdb75d5db77fc07bb06e56a3.tar.gz
nextcloud-server-93eb584199714883cdb75d5db77fc07bb06e56a3.zip
Make typeahead and search limit/length configurable
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/TemplateLayout.php')
-rw-r--r--lib/private/TemplateLayout.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index 6d90d46ec67..4e633bf8b06 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -94,7 +94,9 @@ class TemplateLayout extends \OC_Template {
}
$this->initialState->provideInitialState('core', 'active-app', $this->navigationManager->getActiveEntry());
- $this->initialState->provideInitialState('unified-search', 'limit-default', SearchQuery::LIMIT_DEFAULT);
+ $this->initialState->provideInitialState('unified-search', 'limit-default', (int)$this->config->getAppValue('core', 'unified-search.limit-default', (string)SearchQuery::LIMIT_DEFAULT));
+ $this->initialState->provideInitialState('unified-search', 'min-search-length', (int)$this->config->getAppValue('core', 'unified-search.min-search-length', (string)2));
+ $this->initialState->provideInitialState('unified-search', 'live-search', $this->config->getAppValue('core', 'unified-search.live-search', 'yes') === 'yes');
Util::addScript('core', 'unified-search', 'core');
// set logo link target