From 86d7798944e64aa203f6a118ad40de06d3df36ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 9 Feb 2021 13:52:27 +0100 Subject: [PATCH] Make sure that collections scripts event is properly emitted MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Controller/PageController.php | 2 ++ templates/index.php | 7 +------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index b3ab04cf34e..c5a3b36a6b8 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -44,6 +44,7 @@ use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\Template\PublicTemplateResponse; use OCP\AppFramework\Services\IInitialState; +use OCP\EventDispatcher\GenericEvent; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\IRootFolder; use OCP\ICacheFactory; @@ -255,6 +256,7 @@ public function index(string $token = '', string $callUser = '', string $passwor $this->eventDispatcher->dispatchTyped(new LoadViewer()); } + $this->eventDispatcher->dispatch('\OCP\Collaboration\Resources::loadAdditionalScripts', new GenericEvent()); $response = new TemplateResponse($this->appName, 'index'); $csp = new ContentSecurityPolicy(); $csp->addAllowedConnectDomain('*'); diff --git a/templates/index.php b/templates/index.php index b3949fe93c8..5a9abb765f6 100644 --- a/templates/index.php +++ b/templates/index.php @@ -1,11 +1,6 @@ getEventDispatcher()->dispatch('\OCP\Collaboration\Resources::loadAdditionalScripts'); -}