summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-10-17 09:43:57 +0200
committerGitHub <noreply@github.com>2019-10-17 09:43:57 +0200
commit07dffb6df6fbf019cc668c716a95cf9e94e49f04 (patch)
tree4829b7bc58f879f23c12bab2475204429fd47914 /apps/files_sharing
parente57feec833d892f67364730b911f0f03e6fbda33 (diff)
parent4a2f9fab66b714c45ea430b33c88a65a8402b459 (diff)
downloadnextcloud-server-07dffb6df6fbf019cc668c716a95cf9e94e49f04.tar.gz
nextcloud-server-07dffb6df6fbf019cc668c716a95cf9e94e49f04.zip
Merge pull request #17569 from nextcloud/td/di/middleware
Allow DI in middleware
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/AppInfo/Application.php9
1 files changed, 1 insertions, 8 deletions
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php
index 195d56f3539..d1c5294dae9 100644
--- a/apps/files_sharing/lib/AppInfo/Application.php
+++ b/apps/files_sharing/lib/AppInfo/Application.php
@@ -127,13 +127,6 @@ class Application extends App {
);
});
- $container->registerService('OCSShareAPIMiddleware', function (SimpleContainer $c) use ($server) {
- return new OCSShareAPIMiddleware(
- $server->getShareManager(),
- $server->getL10N($c->query('AppName'))
- );
- });
-
$container->registerService(ShareInfoMiddleware::class, function () use ($server) {
return new ShareInfoMiddleware(
$server->getShareManager()
@@ -142,7 +135,7 @@ class Application extends App {
// Execute middlewares
$container->registerMiddleWare('SharingCheckMiddleware');
- $container->registerMiddleWare('OCSShareAPIMiddleware');
+ $container->registerMiddleWare(OCSShareAPIMiddleware::class);
$container->registerMiddleWare(ShareInfoMiddleware::class);
$container->registerService('MountProvider', function (IContainer $c) {