diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-07-30 21:03:41 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-07-30 21:19:02 +0200 |
commit | 7a24f0cd8d28e60360127da19e40bff4b2e04168 (patch) | |
tree | 43ebd6c9e00679536c565d69e561f631d352ad34 /lib/ocs.php | |
parent | 180bd69dbb21dc6e53533a7d93972445b2ff922e (diff) | |
download | nextcloud-server-7a24f0cd8d28e60360127da19e40bff4b2e04168.tar.gz nextcloud-server-7a24f0cd8d28e60360127da19e40bff4b2e04168.zip |
Make calling ocs/v1.php/config work
Diffstat (limited to 'lib/ocs.php')
-rw-r--r-- | lib/ocs.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/ocs.php b/lib/ocs.php index d7a7951fab5..780fd4a6581 100644 --- a/lib/ocs.php +++ b/lib/ocs.php @@ -251,6 +251,24 @@ class OC_OCS { exit(); } + public static function notFound() { + if($_SERVER['REQUEST_METHOD'] == 'GET') { + $method='get'; + }elseif($_SERVER['REQUEST_METHOD'] == 'PUT') { + $method='put'; + parse_str(file_get_contents("php://input"),$put_vars); + }elseif($_SERVER['REQUEST_METHOD'] == 'POST') { + $method='post'; + }else{ + echo('internal server error: method not supported'); + exit(); + } + $format = self::readData($method, 'format', 'text', ''); + $txt='Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services. DEBUG OUTPUT:'."\n"; + $txt.=OC_OCS::getDebugOutput(); + echo(OC_OCS::generateXml($format,'failed',999,$txt)); + } + /** * generated some debug information to make it easier to find faild API calls * @return debug data string |