summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-04-05 12:50:08 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-04-05 12:50:08 +0200
commit426c0341ffff262f58d1b7f031de4f0c53c8bec5 (patch)
treeac61718627051e469d256685cbe1001b2448d926 /lib/private/legacy
parent5063b76c8ac41199c0a0cc088224d4ab0c1ae9b3 (diff)
downloadnextcloud-server-426c0341ffff262f58d1b7f031de4f0c53c8bec5.tar.gz
nextcloud-server-426c0341ffff262f58d1b7f031de4f0c53c8bec5.zip
Use typed version of IConfig::getSystemValue as much as possible
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/OC_FileChunking.php2
-rw-r--r--lib/private/legacy/OC_Helper.php2
-rw-r--r--lib/private/legacy/OC_Util.php12
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/private/legacy/OC_FileChunking.php b/lib/private/legacy/OC_FileChunking.php
index e3782cabb4a..58bdd0af3d0 100644
--- a/lib/private/legacy/OC_FileChunking.php
+++ b/lib/private/legacy/OC_FileChunking.php
@@ -49,7 +49,7 @@ class OC_FileChunking {
*/
public function __construct($info) {
$this->info = $info;
- $this->ttl = \OC::$server->getConfig()->getSystemValue('cache_chunk_gc_ttl', 86400);
+ $this->ttl = \OC::$server->getConfig()->getSystemValueInt('cache_chunk_gc_ttl', 86400);
}
public function getPrefix() {
diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php
index 8d708118b96..07d81933d00 100644
--- a/lib/private/legacy/OC_Helper.php
+++ b/lib/private/legacy/OC_Helper.php
@@ -634,6 +634,6 @@ class OC_Helper {
* @return bool
*/
public static function isReadOnlyConfigEnabled() {
- return \OC::$server->getConfig()->getSystemValue('config_is_read_only', false);
+ return \OC::$server->getConfig()->getSystemValueBool('config_is_read_only', false);
}
}
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php
index 7f06900feb0..f1f1f810658 100644
--- a/lib/private/legacy/OC_Util.php
+++ b/lib/private/legacy/OC_Util.php
@@ -185,7 +185,7 @@ class OC_Util {
/** @var LoggerInterface $logger */
$logger = \OC::$server->get(LoggerInterface::class);
- $plainSkeletonDirectory = \OC::$server->getConfig()->getSystemValue('skeletondirectory', \OC::$SERVERROOT . '/core/skeleton');
+ $plainSkeletonDirectory = \OC::$server->getConfig()->getSystemValueString('skeletondirectory', \OC::$SERVERROOT . '/core/skeleton');
$userLang = \OC::$server->getL10NFactory()->findLanguage();
$skeletonDirectory = str_replace('{lang}', $userLang, $plainSkeletonDirectory);
@@ -306,7 +306,7 @@ class OC_Util {
*/
public static function getChannel() {
OC_Util::loadVersion();
- return \OC::$server->getConfig()->getSystemValue('updater.release.channel', self::$versionCache['OC_Channel']);
+ return \OC::$server->getConfig()->getSystemValueString('updater.release.channel', self::$versionCache['OC_Channel']);
}
/**
@@ -783,7 +783,7 @@ class OC_Util {
* @return array arrays with error messages and hints
*/
public static function checkDataDirectoryPermissions($dataDirectory) {
- if (\OC::$server->getConfig()->getSystemValue('check_data_directory_permissions', true) === false) {
+ if (!\OC::$server->getConfig()->getSystemValueBool('check_data_directory_permissions', true)) {
return [];
}
@@ -957,7 +957,7 @@ class OC_Util {
$testContent = 'This is used for testing whether htaccess is properly enabled to disallow access from the outside. This file can be safely removed.';
// creating a test file
- $testFile = $config->getSystemValue('datadirectory', OC::$SERVERROOT . '/data') . '/' . $fileName;
+ $testFile = $config->getSystemValueString('datadirectory', OC::$SERVERROOT . '/data') . '/' . $fileName;
if (file_exists($testFile)) {// already running this test, possible recursive call
return false;
@@ -983,7 +983,7 @@ class OC_Util {
* @throws \OCP\HintException If the test file can't get written.
*/
public function isHtaccessWorking(\OCP\IConfig $config) {
- if (\OC::$CLI || !$config->getSystemValue('check_for_working_htaccess', true)) {
+ if (\OC::$CLI || !$config->getSystemValueBool('check_for_working_htaccess', true)) {
return true;
}
@@ -993,7 +993,7 @@ class OC_Util {
}
$fileName = '/htaccesstest.txt';
- $testFile = $config->getSystemValue('datadirectory', OC::$SERVERROOT . '/data') . '/' . $fileName;
+ $testFile = $config->getSystemValueString('datadirectory', OC::$SERVERROOT . '/data') . '/' . $fileName;
// accessing the file via http
$url = \OC::$server->getURLGenerator()->getAbsoluteURL(OC::$WEBROOT . '/data' . $fileName);