summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/application.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/application.php')
-rw-r--r--apps/files_sharing/application.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/apps/files_sharing/application.php b/apps/files_sharing/application.php
index 089ed6afbda..9fe8785df0b 100644
--- a/apps/files_sharing/application.php
+++ b/apps/files_sharing/application.php
@@ -11,6 +11,7 @@
namespace OCA\Files_Sharing;
use OC\AppFramework\Utility\SimpleContainer;
+use OCA\Files_Sharing\Controllers\ExternalSharesController;
use OCA\Files_Sharing\Controllers\ShareController;
use OCA\Files_Sharing\Middleware\SharingCheckMiddleware;
use \OCP\AppFramework\App;
@@ -44,6 +45,14 @@ class Application extends App {
$c->query('ServerContainer')->getLogger()
);
});
+ $container->registerService('ExternalSharesController', function(SimpleContainer $c) {
+ return new ExternalSharesController(
+ $c->query('AppName'),
+ $c->query('Request'),
+ $c->query('IsIncomingShareEnabled'),
+ $c->query('ExternalManager')
+ );
+ });
/**
* Core class wrappers
@@ -54,6 +63,18 @@ class Application extends App {
$container->registerService('URLGenerator', function(SimpleContainer $c) {
return $c->query('ServerContainer')->getUrlGenerator();
});
+ $container->registerService('IsIncomingShareEnabled', function(SimpleContainer $c) {
+ return Helper::isIncomingServer2serverShareEnabled();
+ });
+ $container->registerService('ExternalManager', function(SimpleContainer $c) {
+ return new \OCA\Files_Sharing\External\Manager(
+ \OC::$server->getDatabaseConnection(),
+ \OC\Files\Filesystem::getMountManager(),
+ \OC\Files\Filesystem::getLoader(),
+ \OC::$server->getUserSession(),
+ \OC::$server->getHTTPHelper()
+ );
+ });
/**
* Middleware