summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/appinfo/app.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/federatedfilesharing/appinfo/app.php')
-rw-r--r--apps/federatedfilesharing/appinfo/app.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/apps/federatedfilesharing/appinfo/app.php b/apps/federatedfilesharing/appinfo/app.php
index 5891b9cbbc1..e6fbe615e7f 100644
--- a/apps/federatedfilesharing/appinfo/app.php
+++ b/apps/federatedfilesharing/appinfo/app.php
@@ -20,11 +20,11 @@
*
*/
-$app = new \OCA\FederatedFileSharing\AppInfo\Application('federatedfilesharing');
-
use OCA\FederatedFileSharing\Notifier;
+$app = new \OCA\FederatedFileSharing\AppInfo\Application();
$l = \OC::$server->getL10N('files_sharing');
+$eventDispatcher = \OC::$server->getEventDispatcher();
$app->registerSettings();
@@ -39,3 +39,14 @@ $manager->registerNotifier(function() {
'name' => $l->t('Federated sharing'),
];
});
+
+$federatedShareProvider = $app->getFederatedShareProvider();
+
+$eventDispatcher->addListener(
+ 'OCA\Files::loadAdditionalScripts',
+ function() use ($federatedShareProvider) {
+ if ($federatedShareProvider->isIncomingServer2serverShareEnabled()) {
+ \OCP\Util::addScript('federatedfilesharing', 'external');
+ }
+ }
+);