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:
authorMorris Jobke <hey@morrisjobke.de>2017-03-03 09:41:21 +0300
committerMorris Jobke <hey@morrisjobke.de>2017-03-03 09:41:21 +0300
commit6174a514b76f2e1c32c6fce6de6a23cfac414558 (patch)
tree6aea8f15a25673f9df84e74eb16c8cb3d2cb1116 /ocs
parentd85a351e7777d646e129dd2644355c6dc030f4b1 (diff)
Get rid of static OCS::notFound()
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'ocs')
-rw-r--r--ocs/v1.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/ocs/v1.php b/ocs/v1.php
index 2c83144da6f..e92250b7e38 100644
--- a/ocs/v1.php
+++ b/ocs/v1.php
@@ -80,7 +80,11 @@ try {
OC::$server->getRouter()->match('/ocsapp'.\OC::$server->getRequest()->getRawPathInfo());
} catch (ResourceNotFoundException $e) {
OC_API::setContentType();
- OC_OCS::notFound();
+
+ $format = \OC::$server->getRequest()->getParam('format', 'xml');
+ $txt='Invalid query, please check the syntax. API specifications are here:'
+ .' http://www.freedesktop.org/wiki/Specifications/open-collaboration-services. DEBUG OUTPUT:'."\n";
+ 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);
@@ -91,6 +95,10 @@ try {
} catch (\Exception $e) {
\OC::$server->getLogger()->logException($e);
OC_API::setContentType();
- OC_OCS::notFound();
+
+ $format = \OC::$server->getRequest()->getParam('format', 'xml');
+ $txt='Invalid query, please check the syntax. API specifications are here:'
+ .' http://www.freedesktop.org/wiki/Specifications/open-collaboration-services. DEBUG OUTPUT:'."\n";
+ OC_API::respond(new OC_OCS_Result(null, \OCP\API::RESPOND_NOT_FOUND, $txt), $format);
}