Explorar o código

Merge pull request #15465 from owncloud/issue/15456-disable-ocs-maintenance

Disable OCS api when in maintenance mode
Vincent Petry %!s(int64=9) %!d(string=hai) anos
pai
achega
c12dd2820c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      ocs/v1.php

+ 1 - 1
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);