diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-03-04 13:51:40 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-03-11 09:28:27 +0100 |
commit | 92a6530c0f8bf50e94a0b5d23e3f334ac76a2941 (patch) | |
tree | 55f16ca60661fd6266668162712ba3d5bda4a7de /apps/files | |
parent | 6c968fe77db0ef96e16b103f47e318531f3d33be (diff) | |
download | nextcloud-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')
-rw-r--r-- | apps/files/lib/Controller/ViewController.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index 688db41f8b0..015f34941de 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -39,6 +39,7 @@ namespace OCA\Files\Controller; use OCA\Files\Activity\Helper; use OCA\Files\Event\LoadAdditionalScriptsEvent; use OCA\Files\Event\LoadSidebar; +use OCA\Viewer\Event\LoadViewer; use OCP\App\IAppManager; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\ContentSecurityPolicy; @@ -281,6 +282,10 @@ class ViewController extends Controller { $this->eventDispatcher->dispatch(LoadAdditionalScriptsEvent::class, $event); $this->eventDispatcher->dispatch(LoadSidebar::class, new LoadSidebar()); + // Load Viewer scripts + if (class_exists(LoadViewer::class)) { + $this->eventDispatcher->dispatch(LoadViewer::class, new LoadViewer()); + } $params = []; $params['usedSpacePercent'] = (int) $storageInfo['relative']; |