aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/list.php
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-03-04 13:51:40 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2020-03-11 09:28:27 +0100
commit92a6530c0f8bf50e94a0b5d23e3f334ac76a2941 (patch)
tree55f16ca60661fd6266668162712ba3d5bda4a7de /apps/files_sharing/list.php
parent6c968fe77db0ef96e16b103f47e318531f3d33be (diff)
downloadnextcloud-server-92a6530c0f8bf50e94a0b5d23e3f334ac76a2941.tar.gz
nextcloud-server-92a6530c0f8bf50e94a0b5d23e3f334ac76a2941.zip
Properly emit Viewer event on files and files_sharing
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/list.php')
-rw-r--r--apps/files_sharing/list.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_sharing/list.php b/apps/files_sharing/list.php
index 8197224af52..370ca53c6b4 100644
--- a/apps/files_sharing/list.php
+++ b/apps/files_sharing/list.php
@@ -23,6 +23,7 @@
*/
use OCA\Files\Event\LoadAdditionalScriptsEvent;
use OCA\Files\Event\LoadSidebar;
+use OCA\Viewer\Event\LoadViewer;
use OCP\EventDispatcher\GenericEvent;
// Check if we are a user
@@ -44,4 +45,9 @@ $eventDispatcher->dispatch('\OCP\Collaboration\Resources::loadAdditionalScripts'
$eventDispatcher->dispatch(LoadAdditionalScriptsEvent::class, new LoadAdditionalScriptsEvent());
$eventDispatcher->dispatch(LoadSidebar::class, new LoadSidebar());
+// Load Viewer scripts
+if (class_exists(LoadViewer::class)) {
+ $eventDispatcher->dispatch(LoadViewer::class, new LoadViewer());
+}
+
$tmpl->printPage();