diff options
5 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index 131fe918530..ed809e7658d 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -144,7 +144,7 @@ class ShareesAPIController extends OCSController { public function search(string $search = '', string $itemType = null, int $page = 1, int $perPage = 200, $shareType = null, bool $lookup = true): DataResponse { // only search for string larger than a given threshold - $threshold = (int)$this->config->getSystemValue('sharing.minSearchStringLength', 0); + $threshold = $this->config->getSystemValueInt('sharing.minSearchStringLength', 0); if (strlen($search) < $threshold) { return new DataResponse($this->result); } 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)) { |