diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-01-14 13:56:49 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-01-14 13:56:49 +0100 |
commit | 25806346c2fb33fb4a82906683ffafd950289b53 (patch) | |
tree | 9a6d672669822f6956566aa7f2b810e4b30721f8 /apps/files_sharing/application.php | |
parent | 3a6d2fcc102a7e9c62a2233ccc50691470741337 (diff) | |
download | nextcloud-server-25806346c2fb33fb4a82906683ffafd950289b53.tar.gz nextcloud-server-25806346c2fb33fb4a82906683ffafd950289b53.zip |
remove deprecated code - fixes #13119
Diffstat (limited to 'apps/files_sharing/application.php')
-rw-r--r-- | apps/files_sharing/application.php | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/apps/files_sharing/application.php b/apps/files_sharing/application.php index 773831d99b1..56ec448d6a9 100644 --- a/apps/files_sharing/application.php +++ b/apps/files_sharing/application.php @@ -29,21 +29,22 @@ class Application extends App { parent::__construct('files_sharing', $urlParams); $container = $this->getContainer(); + $server = $container->getServer(); /** * Controllers */ - $container->registerService('ShareController', function(SimpleContainer $c) { + $container->registerService('ShareController', function(SimpleContainer $c) use ($server) { return new ShareController( $c->query('AppName'), $c->query('Request'), $c->query('UserSession'), - $c->query('ServerContainer')->getAppConfig(), - $c->query('ServerContainer')->getConfig(), + $server->getAppConfig(), + $server->getConfig(), $c->query('URLGenerator'), - $c->query('ServerContainer')->getUserManager(), - $c->query('ServerContainer')->getLogger(), - $c->query('ServerContainer')->getActivityManager() + $server->getUserManager(), + $server->getLogger(), + $server->getActivityManager() ); }); $container->registerService('ExternalSharesController', function(SimpleContainer $c) { @@ -58,33 +59,33 @@ class Application extends App { /** * Core class wrappers */ - $container->registerService('UserSession', function(SimpleContainer $c) { - return $c->query('ServerContainer')->getUserSession(); + $container->registerService('UserSession', function(SimpleContainer $c) use ($server) { + return $server->getUserSession(); }); - $container->registerService('URLGenerator', function(SimpleContainer $c) { - return $c->query('ServerContainer')->getUrlGenerator(); + $container->registerService('URLGenerator', function(SimpleContainer $c) use ($server){ + return $server->getUrlGenerator(); }); $container->registerService('IsIncomingShareEnabled', function(SimpleContainer $c) { return Helper::isIncomingServer2serverShareEnabled(); }); - $container->registerService('ExternalManager', function(SimpleContainer $c) { + $container->registerService('ExternalManager', function(SimpleContainer $c) use ($server){ return new \OCA\Files_Sharing\External\Manager( - \OC::$server->getDatabaseConnection(), + $server->getDatabaseConnection(), \OC\Files\Filesystem::getMountManager(), \OC\Files\Filesystem::getLoader(), - \OC::$server->getUserSession(), - \OC::$server->getHTTPHelper() + $server->getUserSession(), + $server->getHTTPHelper() ); }); /** * Middleware */ - $container->registerService('SharingCheckMiddleware', function(SimpleContainer $c){ + $container->registerService('SharingCheckMiddleware', function(SimpleContainer $c) use ($server){ return new SharingCheckMiddleware( $c->query('AppName'), - $c->query('ServerContainer')->getAppConfig(), - $c->getCoreApi() + $server->getConfig(), + $server->getAppManager() ); }); |