diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2020-03-12 08:47:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-12 08:47:14 +0100 |
commit | 9fda1ee39f4d6a45f67333f882ac5d79fe173193 (patch) | |
tree | 71b492b08314d02429ccdadad8a801a5f8dd3974 /apps/files | |
parent | 99aa7adaeff9ae9ea0ffcb65b5b363d256b41be9 (diff) | |
parent | 3cdadeb9e9c75b4e68a8c3c0d4825b0fae2a7854 (diff) | |
download | nextcloud-server-9fda1ee39f4d6a45f67333f882ac5d79fe173193.tar.gz nextcloud-server-9fda1ee39f4d6a45f67333f882ac5d79fe173193.zip |
Merge pull request #19777 from nextcloud/fix/viewer-public
Properly emit Viewer event on files and files_sharing
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..70b878f43ad 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->dispatchTyped(new LoadViewer()); + } $params = []; $params['usedSpacePercent'] = (int) $storageInfo['relative']; |