diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-07-19 14:13:27 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-08-05 14:17:25 +0200 |
commit | a32caa490474c6b87fd809b3c0e5e409253d09a7 (patch) | |
tree | ce38dcf6bd540c9043abc67ca50d497186672701 /apps/files_sharing/lib/AppInfo | |
parent | 84e6b8d9d05f7e481276090101ddf77f1ab3cfdf (diff) | |
download | nextcloud-server-a32caa490474c6b87fd809b3c0e5e409253d09a7.tar.gz nextcloud-server-a32caa490474c6b87fd809b3c0e5e409253d09a7.zip |
Convert Share API to use the AppFramework
Diffstat (limited to 'apps/files_sharing/lib/AppInfo')
-rw-r--r-- | apps/files_sharing/lib/AppInfo/Application.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php index aff42cd43dc..d028cc917f8 100644 --- a/apps/files_sharing/lib/AppInfo/Application.php +++ b/apps/files_sharing/lib/AppInfo/Application.php @@ -28,6 +28,7 @@ namespace OCA\Files_Sharing\AppInfo; use OCA\FederatedFileSharing\DiscoveryManager; +use OCA\Files_Sharing\API\Share20OCS; use OCA\Files_Sharing\MountProvider; use OCP\AppFramework\App; use OC\AppFramework\Utility\SimpleContainer; @@ -35,7 +36,6 @@ use OCA\Files_Sharing\Controllers\ExternalSharesController; use OCA\Files_Sharing\Controllers\ShareController; use OCA\Files_Sharing\Middleware\SharingCheckMiddleware; use \OCP\IContainer; -use OCA\Files_Sharing\Capabilities; class Application extends App { public function __construct(array $urlParams = array()) { @@ -73,6 +73,19 @@ class Application extends App { $c->query('HttpClientService') ); }); + $container->registerService('ShareAPIController', function (SimpleContainer $c) use ($server) { + return new Share20OCS( + $c->query('AppName'), + $c->query('Request'), + $server->getShareManager(), + $server->getGroupManager(), + $server->getUserManager(), + $server->getRootFolder(), + $server->getURLGenerator(), + $server->getUserSession()->getUser(), + $server->getL10N($c->query('AppName')) + ); + }); /** * Core class wrappers |