diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-09-21 20:38:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-21 20:38:18 +0200 |
commit | 38568c362b55e5b77838ab40d81c23fd724633d1 (patch) | |
tree | 1fe12b7ab3f1dfd13669a904e3b2fd9303ff6b37 /lib/private/legacy/api.php | |
parent | e336283a4860b1e4e498968980905105711a6776 (diff) | |
parent | 7eba0a2720ec7cece503c4d6e3859b208fd312cb (diff) | |
download | nextcloud-server-38568c362b55e5b77838ab40d81c23fd724633d1.tar.gz nextcloud-server-38568c362b55e5b77838ab40d81c23fd724633d1.zip |
Merge pull request #6605 from nextcloud/oc_ocs_response_is_dep
OC_OCS_Response is deprecated
Diffstat (limited to 'lib/private/legacy/api.php')
-rw-r--r-- | lib/private/legacy/api.php | 14 |
1 files changed, 7 insertions, 7 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') { |