diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-12-17 08:36:36 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2022-04-13 10:05:55 +0200 |
commit | 93eb584199714883cdb75d5db77fc07bb06e56a3 (patch) | |
tree | bc1e20e89357911b3c1cf992528f15a067845d39 /lib/private/TemplateLayout.php | |
parent | de7280114a501eb8568cf4c0a1c85d5561f76648 (diff) | |
download | nextcloud-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.php | 4 |
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 |