diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-12-12 00:25:10 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-12-15 11:53:39 +0100 |
commit | d8ad4ef6b5fc038e8187dc285925cd1a0d7fb5bf (patch) | |
tree | 2ecbc4bf0bcd0737f7cf57ecb6bbee22982a1928 /lib/private/Template | |
parent | 2b017b704a4a49801bc09774a1a17cfedca9cc7e (diff) | |
download | nextcloud-server-d8ad4ef6b5fc038e8187dc285925cd1a0d7fb5bf.tar.gz nextcloud-server-d8ad4ef6b5fc038e8187dc285925cd1a0d7fb5bf.zip |
use a consistent default value for sharing.maxAutocompleteResults
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private/Template')
-rw-r--r-- | lib/private/Template/JSConfigHelper.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Template/JSConfigHelper.php b/lib/private/Template/JSConfigHelper.php index ebe799bf4f8..83c8d7c0e42 100644 --- a/lib/private/Template/JSConfigHelper.php +++ b/lib/private/Template/JSConfigHelper.php @@ -33,6 +33,7 @@ namespace OC\Template; use bantu\IniGetWrapper\IniGetWrapper; use OC\CapabilitiesManager; use OCP\App\IAppManager; +use OCP\Constants; use OCP\Defaults; use OCP\IConfig; use OCP\IGroupManager; @@ -189,8 +190,8 @@ class JSConfigHelper { 'enable_avatars' => true, // here for legacy reasons - to not crash existing code that relies on this value 'lost_password_link' => $this->config->getSystemValue('lost_password_link', null), 'modRewriteWorking' => $this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true', - 'sharing.maxAutocompleteResults' => (int)$this->config->getSystemValue('sharing.maxAutocompleteResults', 0), - 'sharing.minSearchStringLength' => (int)$this->config->getSystemValue('sharing.minSearchStringLength', 0), + 'sharing.maxAutocompleteResults' => max(0, $this->config->getSystemValueInt('sharing.maxAutocompleteResults', Constants::SHARING_MAX_AUTOCOMPLETE_RESULTS_DEFAULT)), + 'sharing.minSearchStringLength' => $this->config->getSystemValueInt('sharing.minSearchStringLength', 0), 'blacklist_files_regex' => \OCP\Files\FileInfo::BLACKLIST_FILES_REGEX, ]; |