2010-04-14 18:58:52 +04:00
|
|
|
<?php
|
|
|
|
/**
|
2015-03-26 13:44:34 +03:00
|
|
|
* @author Bart Visscher <bartv@thisnet.nl>
|
2016-05-26 20:56:05 +03:00
|
|
|
* @author Frank Karlitschek <frank@karlitschek.de>
|
|
|
|
* @author Lukas Reschke <lukas@statuscode.ch>
|
2015-03-26 13:44:34 +03:00
|
|
|
* @author Morris Jobke <hey@morrisjobke.de>
|
|
|
|
* @author Robin Appelman <icewind@owncloud.com>
|
|
|
|
* @author Thomas Müller <thomas.mueller@tmit.eu>
|
|
|
|
*
|
2016-01-12 17:02:16 +03:00
|
|
|
* @copyright Copyright (c) 2016, ownCloud, Inc.
|
2015-03-26 13:44:34 +03:00
|
|
|
* @license AGPL-3.0
|
|
|
|
*
|
|
|
|
* This code is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
|
|
* as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License, version 3,
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
|
|
*
|
|
|
|
*/
|
2015-08-03 19:06:07 +03:00
|
|
|
use OCP\API;
|
2015-02-26 13:37:37 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Class to handle open collaboration services API requests
|
2010-04-14 18:58:52 +04:00
|
|
|
*/
|
|
|
|
class OC_OCS {
|
2012-07-23 20:34:21 +04:00
|
|
|
/**
|
2015-02-18 01:25:31 +03:00
|
|
|
* Called when a not existing OCS endpoint has been called
|
|
|
|
*/
|
2012-07-30 23:03:41 +04:00
|
|
|
public static function notFound() {
|
2015-02-18 01:25:31 +03:00
|
|
|
$format = \OC::$server->getRequest()->getParam('format', 'xml');
|
2013-02-11 20:44:02 +04:00
|
|
|
$txt='Invalid query, please check the syntax. API specifications are here:'
|
2015-02-18 01:25:31 +03:00
|
|
|
.' http://www.freedesktop.org/wiki/Specifications/open-collaboration-services. DEBUG OUTPUT:'."\n";
|
2015-08-19 15:21:10 +03:00
|
|
|
OC_API::respond(new OC_OCS_Result(null, API::RESPOND_UNKNOWN_ERROR, $txt), $format);
|
|
|
|
}
|
2012-07-23 20:34:21 +04:00
|
|
|
|
2011-02-06 03:22:48 +03:00
|
|
|
}
|