diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-04-05 12:50:08 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-04-05 12:50:08 +0200 |
commit | 426c0341ffff262f58d1b7f031de4f0c53c8bec5 (patch) | |
tree | ac61718627051e469d256685cbe1001b2448d926 /lib/private/Updater.php | |
parent | 5063b76c8ac41199c0a0cc088224d4ab0c1ae9b3 (diff) | |
download | nextcloud-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/Updater.php')
-rw-r--r-- | lib/private/Updater.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 45c22dc89bc..075b2ce339b 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -129,7 +129,7 @@ class Updater extends BasicEmitter { } } - $installedVersion = $this->config->getSystemValue('version', '0.0.0'); + $installedVersion = $this->config->getSystemValueString('version', '0.0.0'); $currentVersion = implode('.', \OCP\Util::getVersion()); $this->log->debug('starting upgrade from ' . $installedVersion . ' to ' . $currentVersion, ['app' => 'core']); @@ -216,7 +216,7 @@ class Updater extends BasicEmitter { if ($currentVendor === 'nextcloud') { return isset($allowedPreviousVersions[$currentVendor][$majorMinor]) && (version_compare($oldVersion, $newVersion, '<=') || - $this->config->getSystemValue('debug', false)); + $this->config->getSystemValueBool('debug', false)); } // Check if the instance can be migrated @@ -251,7 +251,7 @@ class Updater extends BasicEmitter { // create empty file in data dir, so we can later find // out that this is indeed an ownCloud data directory // (in case it didn't exist before) - file_put_contents($this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/.ocdata', ''); + file_put_contents($this->config->getSystemValueString('datadirectory', \OC::$SERVERROOT . '/data') . '/.ocdata', ''); // pre-upgrade repairs $repair = new Repair(Repair::getBeforeUpgradeRepairSteps(), \OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class), \OC::$server->get(LoggerInterface::class)); @@ -399,7 +399,7 @@ class Updater extends BasicEmitter { * @return bool */ private function isCodeUpgrade(): bool { - $installedVersion = $this->config->getSystemValue('version', '0.0.0'); + $installedVersion = $this->config->getSystemValueString('version', '0.0.0'); $currentVersion = implode('.', Util::getVersion()); if (version_compare($currentVersion, $installedVersion, '>')) { return true; |