]> source.dussan.org Git - nextcloud-server.git/commitdiff
Only load viewer in settings if the viewer app is enabled 22650/head
authorMorris Jobke <hey@morrisjobke.de>
Mon, 7 Sep 2020 16:02:57 +0000 (18:02 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Mon, 7 Sep 2020 18:25:57 +0000 (20:25 +0200)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
apps/settings/lib/Settings/Personal/ServerDevNotice.php

index 583146910214f52ee760d0a75b33ef31bfbf38e0..d814fbb9e4af6b4a424ad986c8ed0d1fdf4db9fa 100644 (file)
@@ -77,6 +77,9 @@ class ServerDevNotice implements ISettings {
 
                $hasInitialState = false;
 
+               // viewer is default enabled and this makes a zero-cost assertion for Psalm
+               assert(class_exists(LoadViewer::class));
+
                // If the Reasons to use Nextcloud.pdf file is here, let's init Viewer
                if ($userFolder->nodeExists('Reasons to use Nextcloud.pdf')) {
                        $this->eventDispatcher->dispatch(LoadViewer::class, new LoadViewer());