Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ocs
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-04-08 13:51:20 +0300
committerJoas Schilling <nickvergessen@owncloud.com>2015-04-08 13:51:20 +0300
commitf7dd16f1ac07807824b3ccc58c27e74b462088ae (patch)
tree743945933d9a418f866d3aad6e5aeb462810dd22 /ocs
parent59322a50371227c955bef392ccae4d091e248299 (diff)
Disable OCS api when in maintenance mode
Diffstat (limited to 'ocs')
-rw-r--r--ocs/v1.php2
1 files changed, 1 insertions, 1 deletions
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);