diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2015-11-23 14:06:25 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2015-11-24 10:26:36 +0100 |
commit | aeae73b364048ebf3baf8cf6d692ac4f62467e7e (patch) | |
tree | 9a4c955c4c2cdd5e55e3ab73e7718a1309a0296b /apps | |
parent | cb69e6c2011d43b2c19e594e89cbe7c737aaef1b (diff) | |
download | nextcloud-server-aeae73b364048ebf3baf8cf6d692ac4f62467e7e.tar.gz nextcloud-server-aeae73b364048ebf3baf8cf6d692ac4f62467e7e.zip |
[Sharing 2.0] Removed unused DI stuff
The share manager etc should not care about filtering stuff. They should
return what is asked for them.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/api/ocssharewrapper.php | 35 | ||||
-rw-r--r-- | apps/files_sharing/tests/api/share20ocstest.php | 14 |
2 files changed, 23 insertions, 26 deletions
diff --git a/apps/files_sharing/api/ocssharewrapper.php b/apps/files_sharing/api/ocssharewrapper.php index 3ce2901dfb4..b93a994f756 100644 --- a/apps/files_sharing/api/ocssharewrapper.php +++ b/apps/files_sharing/api/ocssharewrapper.php @@ -26,25 +26,22 @@ class OCSShareWrapper { * @return Share20OCS */ private function getShare20OCS() { - return new Share20OCS(new \OC\Share20\Manager( - \OC::$server->getUserSession()->getUser(), - \OC::$server->getUserManager(), - \OC::$server->getGroupManager(), - \OC::$server->getLogger(), - \OC::$server->getAppConfig(), - \OC::$server->getUserFolder(), - new \OC\Share20\DefaultShareProvider( - \OC::$server->getDatabaseConnection(), - \OC::$server->getUserManager(), - \OC::$server->getGroupManager(), - \OC::$server->getUserFolder() - ) - ), - \OC::$server->getGroupManager(), - \OC::$server->getUserManager(), - \OC::$server->getRequest(), - \OC::$server->getUserFolder(), - \OC::$server->getURLGenerator()); + return new Share20OCS( + new \OC\Share20\Manager( + \OC::$server->getLogger(), + \OC::$server->getAppConfig(), + new \OC\Share20\DefaultShareProvider( + \OC::$server->getDatabaseConnection(), + \OC::$server->getUserManager(), + \OC::$server->getGroupManager(), + \OC::$server->getUserFolder() + ) + ), + \OC::$server->getGroupManager(), + \OC::$server->getUserManager(), + \OC::$server->getRequest(), + \OC::$server->getUserFolder(), + \OC::$server->getURLGenerator()); } public function getAllShares($params) { diff --git a/apps/files_sharing/tests/api/share20ocstest.php b/apps/files_sharing/tests/api/share20ocstest.php index f74585eb47d..9393b8d12c3 100644 --- a/apps/files_sharing/tests/api/share20ocstest.php +++ b/apps/files_sharing/tests/api/share20ocstest.php @@ -24,25 +24,25 @@ use OCA\Files_Sharing\API\Share20OCS; class Share20OCSTest extends \Test\TestCase { - /** @var OC\Share20\Manager */ + /** @var \OC\Share20\Manager */ private $shareManager; - /** @var OCP\IGroupManager */ + /** @var \OCP\IGroupManager */ private $groupManager; - /** @var OCP\IUserManager */ + /** @var \OCP\IUserManager */ private $userManager; - /** @var OCP\IRequest */ + /** @var \OCP\IRequest */ private $request; - /** @var OCP\Files\Folder */ + /** @var \OCP\Files\Folder */ private $userFolder; - /** @var OCP\IURLGenerator */ + /** @var \OCP\IURLGenerator */ private $urlGenerator; - /** @var OCS */ + /** @var Share20OCS */ private $ocs; protected function setUp() { |