diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-08-10 00:43:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-10 00:43:13 +0200 |
commit | 93047f5e4daeed596bc8687abe2b2cd1c5c2c4b0 (patch) | |
tree | e00a942eaf42616b4e7a37a33ecd66ade57c5d19 /lib | |
parent | 7e23351bf0a71c2e53a53a7742c7e84f4a06e2ec (diff) | |
parent | e2f54559d663667554394f2ddaedad5c9114ec76 (diff) | |
download | nextcloud-server-93047f5e4daeed596bc8687abe2b2cd1c5c2c4b0.tar.gz nextcloud-server-93047f5e4daeed596bc8687abe2b2cd1c5c2c4b0.zip |
Merge pull request #777 from nextcloud/ocs_capabilities
Move /cloud/capabilities and /cloud/user to Core
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/OCS/Cloud.php | 55 | ||||
-rw-r--r-- | lib/private/Route/Router.php | 5 | ||||
-rw-r--r-- | lib/private/legacy/ocs/cloud.php | 28 |
3 files changed, 5 insertions, 83 deletions
diff --git a/lib/private/OCS/Cloud.php b/lib/private/OCS/Cloud.php deleted file mode 100644 index 84fcfe6e512..00000000000 --- a/lib/private/OCS/Cloud.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Morris Jobke <hey@morrisjobke.de> - * @author Roeland Jago Douma <roeland@famdouma.nl> - * @author Thomas Müller <thomas.mueller@tmit.eu> - * @author Tom Needham <tom@owncloud.com> - * - * @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/> - * - */ - -namespace OC\OCS; - -class Cloud { - - public static function getCapabilities() { - $result = array(); - list($major, $minor, $micro) = \OCP\Util::getVersion(); - $result['version'] = array( - 'major' => $major, - 'minor' => $minor, - 'micro' => $micro, - 'string' => \OC_Util::getVersionString(), - 'edition' => \OC_Util::getEditionString(), - ); - - $result['capabilities'] = \OC::$server->getCapabilitiesManager()->getCapabilities(); - - return new Result($result); - } - - public static function getCurrentUser() { - $userObject = \OC::$server->getUserManager()->get(\OC_User::getUser()); - $data = array( - 'id' => $userObject->getUID(), - 'display-name' => $userObject->getDisplayName(), - 'email' => $userObject->getEMailAddress(), - ); - return new Result($data); - } -} diff --git a/lib/private/Route/Router.php b/lib/private/Route/Router.php index 9df74184448..59f403d66e8 100644 --- a/lib/private/Route/Router.php +++ b/lib/private/Route/Router.php @@ -163,6 +163,11 @@ class Router implements IRouter { $this->useCollection('root'); require_once __DIR__ . '/../../../settings/routes.php'; require_once __DIR__ . '/../../../core/routes.php'; + + // Also add the OCS collection + $collection = $this->getCollection('root.ocs'); + $collection->addPrefix('/ocsapp'); + $this->root->addCollection($collection); } if ($this->loaded) { // include ocs routes, must be loaded last for /ocs prefix diff --git a/lib/private/legacy/ocs/cloud.php b/lib/private/legacy/ocs/cloud.php deleted file mode 100644 index 11152958301..00000000000 --- a/lib/private/legacy/ocs/cloud.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Roeland Jago Douma <roeland@famdouma.nl> - * @author Thomas Müller <thomas.mueller@tmit.eu> - * - * @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/> - * - */ - -/** - * @deprecated Since 9.1.0 use \OC\OCS\Cloud - */ -class OC_OCS_Cloud extends \OC\OCS\Cloud { -} |