Browse Source

Use correct getSystemValue type

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
tags/v22.0.0beta1
J0WI 3 years ago
parent
commit
74a7c2eefc

+ 1
- 1
apps/files_sharing/lib/Controller/ShareesAPIController.php View File

@@ -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);
}

+ 1
- 1
lib/private/Authentication/Login/CreateSessionTokenCommand.php View File

@@ -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;
}

+ 1
- 1
lib/private/Collaboration/Collaborators/LookupPlugin.php View File

@@ -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)) {

+ 2
- 2
lib/private/Preview/Generator.php View File

@@ -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);


+ 1
- 1
lib/private/Preview/Image.php View File

@@ -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)) {

Loading…
Cancel
Save