diff options
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: |