summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2019-02-22 11:54:20 +0100
committerGitHub <noreply@github.com>2019-02-22 11:54:20 +0100
commit2cc411862912b2e890c0d500b5ba1ce13a6013b6 (patch)
tree01c4eeb066ca058ae83bb2ea218b4c832ecc5f5c /apps
parent7c68e0eae7d378d73aa05361efbba835890c45c2 (diff)
parentb4902369fbbbdddd80ef5043bfb3e9dbd9bf1732 (diff)
downloadnextcloud-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 'apps')
-rw-r--r--apps/dav/lib/Connector/Sabre/MaintenancePlugin.php2
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php3
-rw-r--r--apps/encryption/lib/AppInfo/Application.php2
3 files changed, 4 insertions, 3 deletions
diff --git a/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php b/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php
index 36110c81db9..9c5946481b6 100644
--- a/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php
+++ b/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php
@@ -78,7 +78,7 @@ class MaintenancePlugin extends ServerPlugin {
* @return bool
*/
public function checkMaintenanceMode() {
- if ($this->config->getSystemValue('maintenance', false)) {
+ if ($this->config->getSystemValueBool('maintenance')) {
throw new ServiceUnavailable('System in maintenance mode.');
}
if (Util::needUpgrade()) {
diff --git a/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php b/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php
index d4cc00f1582..5a1a4619ead 100644
--- a/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php
@@ -53,7 +53,8 @@ class MaintenancePluginTest extends TestCase {
public function testMaintenanceMode() {
$this->config
->expects($this->exactly(1))
- ->method('getSystemValue')
+ ->method('getSystemValueBool')
+ ->with('maintenance')
->will($this->returnValue(true));
$this->maintenancePlugin->checkMaintenanceMode();
diff --git a/apps/encryption/lib/AppInfo/Application.php b/apps/encryption/lib/AppInfo/Application.php
index 55839e097a1..5846a01db13 100644
--- a/apps/encryption/lib/AppInfo/Application.php
+++ b/apps/encryption/lib/AppInfo/Application.php
@@ -75,7 +75,7 @@ class Application extends \OCP\AppFramework\App {
* register hooks
*/
public function registerHooks() {
- if (!$this->config->getSystemValue('maintenance', false)) {
+ if (!$this->config->getSystemValueBool('maintenance')) {
$container = $this->getContainer();
$server = $container->getServer();