From: Joas Schilling Date: Wed, 8 Apr 2015 10:51:20 +0000 (+0200) Subject: Disable OCS api when in maintenance mode X-Git-Tag: v8.1.0alpha1~72^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f7dd16f1ac07807824b3ccc58c27e74b462088ae;p=nextcloud-server.git Disable OCS api when in maintenance mode --- diff --git a/ocs/v1.php b/ocs/v1.php index 5bba65d9a1a..398a128c64b 100644 --- a/ocs/v1.php +++ b/ocs/v1.php @@ -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);