summaryrefslogtreecommitdiffstats
path: root/ocs
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-06-30 15:37:38 +0200
committerVincent Petry <pvince81@owncloud.com>2014-06-30 15:37:38 +0200
commit972fffbe02d1e0493d498859b76de698ecf5d067 (patch)
treefbf15344e9bc77d23e5dacca36fa48632f80f507 /ocs
parent2e45eb8ad69d8978220e0b3ea4314545cb08fa6f (diff)
downloadnextcloud-server-972fffbe02d1e0493d498859b76de698ecf5d067.tar.gz
nextcloud-server-972fffbe02d1e0493d498859b76de698ecf5d067.zip
Return 503 OCS response with requested format
Diffstat (limited to 'ocs')
-rw-r--r--ocs/v1.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/ocs/v1.php b/ocs/v1.php
index 624355a8501..0a86fb06411 100644
--- a/ocs/v1.php
+++ b/ocs/v1.php
@@ -27,7 +27,8 @@ if (\OCP\Util::needUpgrade()) {
// since the behavior of apps or remotes are unpredictable during
// an upgrade, return a 503 directly
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
- OC_Template::printErrorPage('Service unavailable');
+ $response = new OC_OCS_Result(null, OC_Response::STATUS_SERVICE_UNAVAILABLE, 'Service unavailable');
+ OC_API::respond($response, OC_API::requestedFormat());
exit;
}