From 972fffbe02d1e0493d498859b76de698ecf5d067 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 30 Jun 2014 15:37:38 +0200 Subject: Return 503 OCS response with requested format --- ocs/v1.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ocs') 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; } -- cgit v1.2.3