diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-02-09 15:52:27 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-02-12 09:47:54 +0300 |
commit | 3eb05c163f79039c5bcd8a0be252502927a17cbb (patch) | |
tree | 8bbe61af63b28e6be183cbdd8be2ddfdc3287894 | |
parent | b333b4d0c93a6f8ecb90955887eb647404fb59dc (diff) |
Make sure that collections scripts event is properly emitted
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r-- | lib/Controller/PageController.php | 2 | ||||
-rw-r--r-- | templates/index.php | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index d3246e1d0..5b2cdc866 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -43,6 +43,7 @@ use OCP\AppFramework\Http\RedirectResponse; use OCP\AppFramework\Http\Response; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\Template\PublicTemplateResponse; +use OCP\EventDispatcher\GenericEvent; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\IRootFolder; use OCP\ICacheFactory; @@ -249,6 +250,7 @@ class PageController extends Controller { $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 b3949fe93..5a9abb765 100644 --- a/templates/index.php +++ b/templates/index.php @@ -1,11 +1,6 @@ <?php -/** @var \OCP\IL10N $l */ -/** @var array $_ */ +declare(strict_types=1); script('spreed', 'talk'); - style('spreed', 'merged'); -if (($_['user_uid'] ?? '') !== '') { - \OC::$server->getEventDispatcher()->dispatch('\OCP\Collaboration\Resources::loadAdditionalScripts'); -} |