diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2019-02-22 11:54:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-22 11:54:20 +0100 |
commit | 2cc411862912b2e890c0d500b5ba1ce13a6013b6 (patch) | |
tree | 01c4eeb066ca058ae83bb2ea218b4c832ecc5f5c /core | |
parent | 7c68e0eae7d378d73aa05361efbba835890c45c2 (diff) | |
parent | b4902369fbbbdddd80ef5043bfb3e9dbd9bf1732 (diff) | |
download | nextcloud-server-2cc411862912b2e890c0d500b5ba1ce13a6013b6.tar.gz nextcloud-server-2cc411862912b2e890c0d500b5ba1ce13a6013b6.zip |
Merge pull request #14066 from nextcloud/feature/noid/casted-system-values
Get typed system values
Diffstat (limited to 'core')
-rw-r--r-- | core/Command/Encryption/DecryptAll.php | 2 | ||||
-rw-r--r-- | core/Command/Encryption/EncryptAll.php | 2 | ||||
-rw-r--r-- | core/Command/Maintenance/Mode.php | 2 | ||||
-rw-r--r-- | core/Command/Maintenance/Repair.php | 2 | ||||
-rw-r--r-- | core/Command/Upgrade.php | 4 |
5 files changed, 6 insertions, 6 deletions
diff --git a/core/Command/Encryption/DecryptAll.php b/core/Command/Encryption/DecryptAll.php index 253223f9529..6ae90196963 100644 --- a/core/Command/Encryption/DecryptAll.php +++ b/core/Command/Encryption/DecryptAll.php @@ -89,7 +89,7 @@ class DecryptAll extends Command { */ protected function forceMaintenanceAndTrashbin() { $this->wasTrashbinEnabled = $this->appManager->isEnabledForUser('files_trashbin'); - $this->wasMaintenanceModeEnabled = $this->config->getSystemValue('maintenance', false); + $this->wasMaintenanceModeEnabled = $this->config->getSystemValueBool('maintenance'); $this->config->setSystemValue('maintenance', true); $this->appManager->disableApp('files_trashbin'); } diff --git a/core/Command/Encryption/EncryptAll.php b/core/Command/Encryption/EncryptAll.php index b16fa0af2c7..7a257aac201 100644 --- a/core/Command/Encryption/EncryptAll.php +++ b/core/Command/Encryption/EncryptAll.php @@ -78,7 +78,7 @@ class EncryptAll extends Command { */ protected function forceMaintenanceAndTrashbin() { $this->wasTrashbinEnabled = $this->appManager->isEnabledForUser('files_trashbin'); - $this->wasMaintenanceModeEnabled = $this->config->getSystemValue('maintenance', false); + $this->wasMaintenanceModeEnabled = $this->config->getSystemValueBool('maintenance'); $this->config->setSystemValue('maintenance', true); $this->appManager->disableApp('files_trashbin'); } diff --git a/core/Command/Maintenance/Mode.php b/core/Command/Maintenance/Mode.php index db4c9dc8c0b..1692eb08d87 100644 --- a/core/Command/Maintenance/Mode.php +++ b/core/Command/Maintenance/Mode.php @@ -59,7 +59,7 @@ class Mode extends Command { } protected function execute(InputInterface $input, OutputInterface $output) { - $maintenanceMode = $this->config->getSystemValue('maintenance', false); + $maintenanceMode = $this->config->getSystemValueBool('maintenance'); if ($input->getOption('on')) { if ($maintenanceMode === false) { $this->config->setSystemValue('maintenance', true); diff --git a/core/Command/Maintenance/Repair.php b/core/Command/Maintenance/Repair.php index e9595a22285..460bc6880c1 100644 --- a/core/Command/Maintenance/Repair.php +++ b/core/Command/Maintenance/Repair.php @@ -106,7 +106,7 @@ class Repair extends Command { } } - $maintenanceMode = $this->config->getSystemValue('maintenance', false); + $maintenanceMode = $this->config->getSystemValueBool('maintenance'); $this->config->setSystemValue('maintenance', true); $this->progress = new ProgressBar($output); diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php index 5a2deea0b6c..2d7ec4f688d 100644 --- a/core/Command/Upgrade.php +++ b/core/Command/Upgrade.php @@ -180,7 +180,7 @@ class Upgrade extends Command { $dispatcher->addListener('\OC\Repair::info', $repairListener); $dispatcher->addListener('\OC\Repair::warning', $repairListener); $dispatcher->addListener('\OC\Repair::error', $repairListener); - + $updater->listen('\OC\Updater', 'maintenanceEnabled', function () use($output) { $output->writeln('<info>Turned on maintenance mode</info>'); @@ -264,7 +264,7 @@ class Upgrade extends Command { } return self::ERROR_SUCCESS; - } else if($this->config->getSystemValue('maintenance', false)) { + } else if($this->config->getSystemValueBool('maintenance')) { //Possible scenario: Nextcloud core is updated but an app failed $output->writeln('<warning>Nextcloud is in maintenance mode</warning>'); $output->write('<comment>Maybe an upgrade is already in process. Please check the ' |