Merge pull request #15465 from owncloud/issue/15456-disable-ocs-maintenance
Disable OCS api when in maintenance mode
This commit is contained in:
commit
c12dd2820c
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
require_once '../lib/base.php';
|
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
|
// since the behavior of apps or remotes are unpredictable during
|
||||||
// an upgrade, return a 503 directly
|
// an upgrade, return a 503 directly
|
||||||
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
|
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
|
||||||
|
|
Loading…
Reference in New Issue