diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-03-03 00:41:21 -0600 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-03-03 00:41:21 -0600 |
commit | 6174a514b76f2e1c32c6fce6de6a23cfac414558 (patch) | |
tree | 6aea8f15a25673f9df84e74eb16c8cb3d2cb1116 /ocs | |
parent | d85a351e7777d646e129dd2644355c6dc030f4b1 (diff) | |
download | nextcloud-server-6174a514b76f2e1c32c6fce6de6a23cfac414558.tar.gz nextcloud-server-6174a514b76f2e1c32c6fce6de6a23cfac414558.zip |
Get rid of static OCS::notFound()
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'ocs')
-rw-r--r-- | ocs/v1.php | 12 |
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); } |