diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-09-21 17:56:00 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-09-21 17:56:00 +0200 |
commit | 87e10f9e6a0907adf20538f09159274e6b9ca429 (patch) | |
tree | 821c99e73b518064dc1e8b966e31416babf80fcf /lib | |
parent | 4d556a3ade39f38eb4b2ca3253863e3f86c7c69b (diff) | |
download | nextcloud-server-87e10f9e6a0907adf20538f09159274e6b9ca429.tar.gz nextcloud-server-87e10f9e6a0907adf20538f09159274e6b9ca429.zip |
OC_OCS_Response is deprecated
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/api.php | 14 | ||||
-rw-r--r-- | lib/public/AppFramework/Http/OCSResponse.php | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/private/legacy/api.php b/lib/private/legacy/api.php index f65275bf1da..7fe84b73c43 100644 --- a/lib/private/legacy/api.php +++ b/lib/private/legacy/api.php @@ -129,7 +129,7 @@ class OC_API { if(!self::isAuthorised($action)) { $responses[] = array( 'app' => $action['app'], - 'response' => new OC_OCS_Result(null, API::RESPOND_UNAUTHORISED, 'Unauthorised'), + 'response' => new \OC\OCS\Result(null, API::RESPOND_UNAUTHORISED, 'Unauthorised'), 'shipped' => $appManager->isShipped($action['app']), ); continue; @@ -137,7 +137,7 @@ class OC_API { if(!is_callable($action['action'])) { $responses[] = array( 'app' => $action['app'], - 'response' => new OC_OCS_Result(null, API::RESPOND_NOT_FOUND, 'Api method not found'), + 'response' => new \OC\OCS\Result(null, API::RESPOND_NOT_FOUND, 'Api method not found'), 'shipped' => $appManager->isShipped($action['app']), ); continue; @@ -161,7 +161,7 @@ class OC_API { /** * merge the returned result objects into one response * @param array $responses - * @return OC_OCS_Result + * @return \OC\OCS\Result */ public static function mergeResponses($responses) { // Sort into shipped and third-party @@ -205,7 +205,7 @@ class OC_API { $code = $picked['response']->getStatusCode(); $meta = $picked['response']->getMeta(); $headers = $picked['response']->getHeaders(); - $response = new OC_OCS_Result($data, $code, $meta['message'], $headers); + $response = new \OC\OCS\Result($data, $code, $meta['message'], $headers); return $response; } elseif(!empty($shipped['succeeded'])) { $responses = array_merge($shipped['succeeded'], $thirdparty['succeeded']); @@ -219,7 +219,7 @@ class OC_API { $code = $picked['response']->getStatusCode(); $meta = $picked['response']->getMeta(); $headers = $picked['response']->getHeaders(); - $response = new OC_OCS_Result($data, $code, $meta['message'], $headers); + $response = new \OC\OCS\Result($data, $code, $meta['message'], $headers); return $response; } else { $responses = $thirdparty['succeeded']; @@ -251,7 +251,7 @@ class OC_API { } } - return new OC_OCS_Result($data, $statusCode, $statusMessage, $header); + return new \OC\OCS\Result($data, $statusCode, $statusMessage, $header); } /** @@ -351,7 +351,7 @@ class OC_API { /** * respond to a call - * @param OC_OCS_Result $result + * @param \OC\OCS\Result $result * @param string $format the format xml|json */ public static function respond($result, $format='xml') { diff --git a/lib/public/AppFramework/Http/OCSResponse.php b/lib/public/AppFramework/Http/OCSResponse.php index 8614e76805f..ee1207f1217 100644 --- a/lib/public/AppFramework/Http/OCSResponse.php +++ b/lib/public/AppFramework/Http/OCSResponse.php @@ -83,7 +83,7 @@ class OCSResponse extends Response { * @suppress PhanDeprecatedClass */ public function render() { - $r = new \OC_OCS_Result($this->data, $this->statuscode, $this->message); + $r = new \OC\OCS\Result($this->data, $this->statuscode, $this->message); $r->setTotalItems($this->itemscount); $r->setItemsPerPage($this->itemsperpage); |