]> source.dussan.org Git - nextcloud-server.git/commitdiff
Disable OCS api when in maintenance mode
authorJoas Schilling <nickvergessen@owncloud.com>
Wed, 8 Apr 2015 10:51:20 +0000 (12:51 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Wed, 6 May 2015 09:50:08 +0000 (11:50 +0200)
ocs/v1.php

index 0a86fb064117c2d45fe6c492714c3dd27d1ae46f..495ce22585e30774dd9bcd81186c070c2b41277b 100644 (file)
@@ -23,7 +23,7 @@
 
 require_once '../lib/base.php';
 
-if (\OCP\Util::needUpgrade()) {
+if (\OCP\Util::needUpgrade() || \OCP\Config::getSystemValue('maintenance', false)) {
        // since the behavior of apps or remotes are unpredictable during
        // an upgrade, return a 503 directly
        OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);