From: Morris Jobke Date: Mon, 7 Sep 2020 16:02:57 +0000 (+0200) Subject: Only load viewer in settings if the viewer app is enabled X-Git-Tag: v20.0.0beta4~44^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ce1e873a0a16cb756c5edfdbd4488b7f6cf9bbb7;p=nextcloud-server.git Only load viewer in settings if the viewer app is enabled Signed-off-by: Morris Jobke --- diff --git a/apps/settings/lib/Settings/Personal/ServerDevNotice.php b/apps/settings/lib/Settings/Personal/ServerDevNotice.php index 58314691021..d814fbb9e4a 100644 --- a/apps/settings/lib/Settings/Personal/ServerDevNotice.php +++ b/apps/settings/lib/Settings/Personal/ServerDevNotice.php @@ -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());