diff options
author | J0WI <J0WI@users.noreply.github.com> | 2021-04-12 22:53:34 +0200 |
---|---|---|
committer | J0WI <J0WI@users.noreply.github.com> | 2021-04-12 22:54:50 +0200 |
commit | 74a7c2eefc60f6cb08f8a04ed6f785d8177d3a63 (patch) | |
tree | eb25ea2a2f20c866542c45a916f19e6efa5ce116 /lib | |
parent | 4be2e1601e80a09aebac57eabb0aaf60e744362e (diff) | |
download | nextcloud-server-74a7c2eefc60f6cb08f8a04ed6f785d8177d3a63.tar.gz nextcloud-server-74a7c2eefc60f6cb08f8a04ed6f785d8177d3a63.zip |
Use correct getSystemValue type
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Authentication/Login/CreateSessionTokenCommand.php | 2 | ||||
-rw-r--r-- | lib/private/Collaboration/Collaborators/LookupPlugin.php | 2 | ||||
-rw-r--r-- | lib/private/Preview/Generator.php | 4 | ||||
-rw-r--r-- | lib/private/Preview/Image.php | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/Authentication/Login/CreateSessionTokenCommand.php b/lib/private/Authentication/Login/CreateSessionTokenCommand.php index 05b6c27f565..9d4d43b951b 100644 --- a/lib/private/Authentication/Login/CreateSessionTokenCommand.php +++ b/lib/private/Authentication/Login/CreateSessionTokenCommand.php @@ -46,7 +46,7 @@ class CreateSessionTokenCommand extends ALoginCommand { public function process(LoginData $loginData): LoginResult { $tokenType = IToken::REMEMBER; - if ((int)$this->config->getSystemValue('remember_login_cookie_lifetime', 60 * 60 * 24 * 15) === 0) { + if ($this->config->getSystemValueInt('remember_login_cookie_lifetime', 60 * 60 * 24 * 15) === 0) { $loginData->setRememberLogin(false); $tokenType = IToken::DO_NOT_REMEMBER; } diff --git a/lib/private/Collaboration/Collaborators/LookupPlugin.php b/lib/private/Collaboration/Collaborators/LookupPlugin.php index 974254e9a3f..f675cece99e 100644 --- a/lib/private/Collaboration/Collaborators/LookupPlugin.php +++ b/lib/private/Collaboration/Collaborators/LookupPlugin.php @@ -66,7 +66,7 @@ class LookupPlugin implements ISearchPlugin { public function search($search, $limit, $offset, ISearchResult $searchResult) { $isGlobalScaleEnabled = $this->config->getSystemValue('gs.enabled', false); $isLookupServerEnabled = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'yes') === 'yes'; - $hasInternetConnection = (bool)$this->config->getSystemValue('has_internet_connection', true); + $hasInternetConnection = $this->config->getSystemValueBool('has_internet_connection', true); // if case of Global Scale we always search the lookup server if (!$isGlobalScaleEnabled && (!$isLookupServerEnabled || !$hasInternetConnection)) { diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php index 2be08d1b2c4..e8d60739b1d 100644 --- a/lib/private/Preview/Generator.php +++ b/lib/private/Preview/Generator.php @@ -238,8 +238,8 @@ class Generator { continue; } - $maxWidth = (int)$this->config->getSystemValue('preview_max_x', 4096); - $maxHeight = (int)$this->config->getSystemValue('preview_max_y', 4096); + $maxWidth = $this->config->getSystemValueInt('preview_max_x', 4096); + $maxHeight = $this->config->getSystemValueInt('preview_max_y', 4096); $preview = $this->helper->getThumbnail($provider, $file, $maxWidth, $maxHeight); diff --git a/lib/private/Preview/Image.php b/lib/private/Preview/Image.php index eea471a2356..9ed76439d01 100644 --- a/lib/private/Preview/Image.php +++ b/lib/private/Preview/Image.php @@ -38,7 +38,7 @@ abstract class Image extends ProviderV2 { * {@inheritDoc} */ public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage { - $maxSizeForImages = \OC::$server->getConfig()->getSystemValue('preview_max_filesize_image', 50); + $maxSizeForImages = \OC::$server->getConfig()->getSystemValueInt('preview_max_filesize_image', 50); $size = $file->getSize(); if ($maxSizeForImages !== -1 && $size > ($maxSizeForImages * 1024 * 1024)) { |