summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-01-11 10:30:03 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2016-01-13 16:35:14 +0100
commit67b7ebccd134d68329fae201669924118a4d98fc (patch)
treeeae8adce95c898cbb481e5c35b54b41cb506aef0 /apps/files_sharing
parentb4de427c1e0d3de5f937b3514c4dd2b8c59d7b15 (diff)
downloadnextcloud-server-67b7ebccd134d68329fae201669924118a4d98fc.tar.gz
nextcloud-server-67b7ebccd134d68329fae201669924118a4d98fc.zip
[Share 2.0] Add share provider factory
* Add providers * Add share manager to server container * Use share manager from server container * Properly get the share manager
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/api/ocssharewrapper.php28
1 files changed, 1 insertions, 27 deletions
diff --git a/apps/files_sharing/api/ocssharewrapper.php b/apps/files_sharing/api/ocssharewrapper.php
index 7f909d413ee..a186a34cf6a 100644
--- a/apps/files_sharing/api/ocssharewrapper.php
+++ b/apps/files_sharing/api/ocssharewrapper.php
@@ -26,34 +26,8 @@ class OCSShareWrapper {
* @return Share20OCS
*/
private function getShare20OCS() {
- $manager =new \OC\Share20\Manager(
- \OC::$server->getLogger(),
- \OC::$server->getConfig(),
- \OC::$server->getSecureRandom(),
- \OC::$server->getHasher(),
- \OC::$server->getMountManager(),
- \OC::$server->getGroupManager(),
- \OC::$server->getL10N('core')
- );
-
- $manager->registerProvider('ocdefault',
- [
- \OCP\Share::SHARE_TYPE_USER,
- \OCP\SHARE::SHARE_TYPE_GROUP,
- \OCP\SHARE::SHARE_TYPE_LINK
- ],
- function() {
- return new \OC\Share20\DefaultShareProvider(
- \OC::$server->getDatabaseConnection(),
- \OC::$server->getUserManager(),
- \OC::$server->getGroupManager(),
- \OC::$server->getRootFolder()
- );
- }
- );
-
return new Share20OCS(
- $manager,
+ \OC::$server->getShareManager(),
\OC::$server->getGroupManager(),
\OC::$server->getUserManager(),
\OC::$server->getRequest(),