Disable OCS api when in maintenance mode

This commit is contained in:
Joas Schilling 2015-04-08 12:51:20 +02:00
parent 59322a5037
commit f7dd16f1ac
1 changed files with 1 additions and 1 deletions

View 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);