Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-02-09 15:52:27 +0300
committerJoas Schilling <coding@schilljs.com>2021-02-11 20:58:57 +0300
commit86d7798944e64aa203f6a118ad40de06d3df36ea (patch)
tree6b241384692b429e7ac76d5aaca5dd41e1e655b4
parentdd0e81c274f22e6ab0cc4bed96cd2736a815d5cc (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.php2
-rw-r--r--templates/index.php7
2 files changed, 3 insertions, 6 deletions
diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php
index b3ab04cf3..c5a3b36a6 100644
--- a/lib/Controller/PageController.php
+++ b/lib/Controller/PageController.php
@@ -44,6 +44,7 @@ use OCP\AppFramework\Http\Response;
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 @@ 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');
-}