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:
Diffstat (limited to 'ocs')
-rw-r--r--ocs/v1.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/ocs/v1.php b/ocs/v1.php
index fb996d0564d..1f5d3e6619e 100644
--- a/ocs/v1.php
+++ b/ocs/v1.php
@@ -36,7 +36,7 @@ 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);
+ http_response_code(503);
$response = new \OC\OCS\Result(null, OC_Response::STATUS_SERVICE_UNAVAILABLE, 'Service unavailable');
OC_API::respond($response, OC_API::requestedFormat());
exit;
@@ -65,7 +65,7 @@ try {
// Fall through the not found
} catch (MethodNotAllowedException $e) {
OC_API::setContentType();
- OC_Response::setStatus(405);
+ http_response_code(405);
exit();
} catch (Exception $ex) {
OC_API::respond($ex->getResult(), OC_API::requestedFormat());
@@ -89,7 +89,7 @@ try {
OC_API::respond(new \OC\OCS\Result(null, \OCP\API::RESPOND_NOT_FOUND, $txt), $format);
} catch (MethodNotAllowedException $e) {
OC_API::setContentType();
- OC_Response::setStatus(405);
+ http_response_code(405);
} catch (\OC\OCS\Exception $ex) {
OC_API::respond($ex->getResult(), OC_API::requestedFormat());
} catch (\OC\User\LoginException $e) {