diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2021-03-03 15:10:42 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2021-03-03 20:54:32 +0100 |
commit | cc744740b790a72e2d5c6b07814dadb5b58014fb (patch) | |
tree | 3ce5db818feacccfecb81d98d7ecaa11b7e11336 /lib/private/legacy/OC_API.php | |
parent | 0829fea5e7f9a81a69599c5df7c75b997055e5ba (diff) | |
download | nextcloud-server-cc744740b790a72e2d5c6b07814dadb5b58014fb.tar.gz nextcloud-server-cc744740b790a72e2d5c6b07814dadb5b58014fb.zip |
Remove deprecated \OCP\API
Time to remove this forgood now.
Remaining constant moved over
The world is a tiny bit better
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/legacy/OC_API.php')
-rw-r--r-- | lib/private/legacy/OC_API.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/legacy/OC_API.php b/lib/private/legacy/OC_API.php index 16a144269b3..9e9c28e2dba 100644 --- a/lib/private/legacy/OC_API.php +++ b/lib/private/legacy/OC_API.php @@ -48,7 +48,7 @@ class OC_API { $request = \OC::$server->getRequest(); // Send 401 headers if unauthorised - if ($result->getStatusCode() === API::RESPOND_UNAUTHORISED) { + if ($result->getStatusCode() === \OCP\AppFramework\OCSController::RESPOND_UNAUTHORISED) { // If request comes from JS return dummy auth request if ($request->getHeader('X-Requested-With') === 'XMLHttpRequest') { header('WWW-Authenticate: DummyBasic realm="Authorisation Required"'); @@ -143,13 +143,13 @@ class OC_API { */ public static function mapStatusCodes($sc) { switch ($sc) { - case API::RESPOND_NOT_FOUND: + case \OCP\AppFramework\OCSController::RESPOND_NOT_FOUND: return Http::STATUS_NOT_FOUND; - case API::RESPOND_SERVER_ERROR: + case \OCP\AppFramework\OCSController::RESPOND_SERVER_ERROR: return Http::STATUS_INTERNAL_SERVER_ERROR; - case API::RESPOND_UNKNOWN_ERROR: + case \OCP\AppFramework\OCSController::RESPOND_UNKNOWN_ERROR: return Http::STATUS_INTERNAL_SERVER_ERROR; - case API::RESPOND_UNAUTHORISED: + case \OCP\AppFramework\OCSController::RESPOND_UNAUTHORISED: // already handled for v1 return null; case 100: |