summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/application.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-01-14 13:56:49 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-01-14 13:56:49 +0100
commit25806346c2fb33fb4a82906683ffafd950289b53 (patch)
tree9a6d672669822f6956566aa7f2b810e4b30721f8 /apps/files_sharing/application.php
parent3a6d2fcc102a7e9c62a2233ccc50691470741337 (diff)
downloadnextcloud-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.php35
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()
);
});