Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-07-16 11:27:44 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-07-16 16:52:46 +0300
commitb641f2560603c3aded47d1482d27602f664accc1 (patch)
tree3e37ec81e5dceeb1b226f1ba672f1140b9e78e2f /apps/files_sharing/lib
parent33aeef2d101029dd4538994d462a51062a5975d7 (diff)
Migrate files sharing to the PSR container
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/AppInfo/Application.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php
index acf1462601d..1b1bd08d3fd 100644
--- a/apps/files_sharing/lib/AppInfo/Application.php
+++ b/apps/files_sharing/lib/AppInfo/Application.php
@@ -50,13 +50,15 @@ use OCA\Files\Event\LoadAdditionalScriptsEvent;
use OCA\Files\Event\LoadSidebar;
use OCP\AppFramework\App;
use OCP\EventDispatcher\IEventDispatcher;
+use OCP\Federation\ICloudIdManager;
use OCP\Files\Config\IMountProviderCollection;
use OCP\Group\Events\UserAddedEvent;
-use OCP\IContainer;
+use OCP\IDBConnection;
use OCP\IGroup;
use OCP\IServerContainer;
use OCP\Share\Events\ShareCreatedEvent;
use OCP\Util;
+use Psr\Container\ContainerInterface;
use Symfony\Component\EventDispatcher\GenericEvent;
class Application extends App {
@@ -103,15 +105,13 @@ class Application extends App {
$container->registerMiddleWare(OCSShareAPIMiddleware::class);
$container->registerMiddleWare(ShareInfoMiddleware::class);
- $container->registerService('ExternalMountProvider', function (IContainer $c) {
- /** @var \OCP\IServerContainer $server */
- $server = $c->query('ServerContainer');
+ $container->registerService('ExternalMountProvider', function (ContainerInterface $c) {
return new \OCA\Files_Sharing\External\MountProvider(
- $server->getDatabaseConnection(),
+ $c->get(IDBConnection::class),
function () use ($c) {
- return $c->query(Manager::class);
+ return $c->get(Manager::class);
},
- $server->getCloudIdManager()
+ $c->get(ICloudIdManager::class)
);
});