diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-05-27 18:36:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-27 18:36:40 +0200 |
commit | e4378fd18cb39407097f40431cd28c1fa01ba75d (patch) | |
tree | c4b3cd4a8fb79afe6a5ab680625c3664fdaa8f66 /apps/files_sharing/lib | |
parent | ac79137816709b4adc6b2e21cc52c807381c4baf (diff) | |
parent | ae0e9ff0834e9446d14d58b5dfbc5cc90794f760 (diff) | |
download | nextcloud-server-e4378fd18cb39407097f40431cd28c1fa01ba75d.tar.gz nextcloud-server-e4378fd18cb39407097f40431cd28c1fa01ba75d.zip |
Merge pull request #32349 from nextcloud/enh/projects-event
Add event to load additional scripts for projects
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/AppInfo/Application.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php index 2539247b561..6f1d72f9115 100644 --- a/apps/files_sharing/lib/AppInfo/Application.php +++ b/apps/files_sharing/lib/AppInfo/Application.php @@ -56,6 +56,7 @@ use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; +use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent as ResourcesLoadAdditionalScriptsEvent; use OCP\EventDispatcher\IEventDispatcher; use OCP\Federation\ICloudIdManager; use OCP\Files\Config\IMountProviderCollection; @@ -131,11 +132,11 @@ class Application extends App implements IBootstrap { $dispatcher->addServiceListener(BeforeTemplateRenderedEvent::class, LegacyBeforeTemplateRenderedListener::class); $dispatcher->addServiceListener(LoadSidebar::class, LoadSidebarListener::class); $dispatcher->addServiceListener(ShareCreatedEvent::class, ShareInteractionListener::class); - $dispatcher->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function () { - \OCP\Util::addScript('files_sharing', 'collaboration'); - }); $dispatcher->addServiceListener(ShareCreatedEvent::class, UserShareAcceptanceListener::class); $dispatcher->addServiceListener(UserAddedEvent::class, UserAddedToGroupListener::class); + $dispatcher->addListener(ResourcesLoadAdditionalScriptsEvent::class, function () { + \OCP\Util::addScript('files_sharing', 'collaboration'); + }); // notifications api to accept incoming user shares $oldDispatcher->addListener('OCP\Share::postShare', function (GenericEvent $event) { |