]> 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)
committerJoas Schilling <nickvergessen@owncloud.com>
Wed, 8 Apr 2015 10:51:20 +0000 (12:51 +0200)
ocs/v1.php

index 5bba65d9a1a2290c00e8f9a5c376e7519b2100cd..398a128c64be69651ff772485e73217728f7adaf 100644 (file)
@@ -27,7 +27,7 @@
 
 require_once '../lib/base.php';
 
-if (\OCP\Util::needUpgrade()) {
+if (\OCP\Util::needUpgrade() || \OC::$server->getSystemConfig()->getValue('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);