From 0b6e414998385c19b7f5defe4852308c454e424a Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 4 May 2021 13:19:40 -0400 Subject: [PATCH] Enable/Disable Snapshots based on ZM_FEATURES_SNAPSHOTS config setting --- web/skins/classic/includes/functions.php | 2 +- web/skins/classic/views/montage.php | 2 ++ web/skins/classic/views/snapshot.php | 5 ++++- web/skins/classic/views/snapshots.php | 3 +++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index ddb8667a4..1064729cc 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -718,7 +718,7 @@ function getMontageReviewHTML($view) { function getSnapshotsHTML($view) { $result = ''; - if ( canView('Snapshots') ) { + if (defined('ZM_FEATURES_SNAPSHOTS') and ZM_FEATURES_SNAPSHOTS and canView('Snapshots')) { $class = $view == 'snapshots' ? ' selected' : ''; $result .= ''.PHP_EOL; } diff --git a/web/skins/classic/views/montage.php b/web/skins/classic/views/montage.php index f784dfc24..7d43eb1b2 100644 --- a/web/skins/classic/views/montage.php +++ b/web/skins/classic/views/montage.php @@ -200,10 +200,12 @@ if ( canView('System') ) { + + diff --git a/web/skins/classic/views/snapshot.php b/web/skins/classic/views/snapshot.php index f608ee814..123f1d085 100644 --- a/web/skins/classic/views/snapshot.php +++ b/web/skins/classic/views/snapshot.php @@ -18,9 +18,12 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. // -if ( !canView('Snapshots') ) { +if (!canView('Snapshots')) { $view = 'error'; return; +} else if (!ZM_FEATURES_SNAPSHOTS) { + $view = 'console'; + return; } require_once('includes/Event.php'); diff --git a/web/skins/classic/views/snapshots.php b/web/skins/classic/views/snapshots.php index a5f58f600..fe48e4345 100644 --- a/web/skins/classic/views/snapshots.php +++ b/web/skins/classic/views/snapshots.php @@ -21,6 +21,9 @@ if (!canView('Snapshots')) { $view = 'error'; return; +} else if (!ZM_FEATURES_SNAPSHOTS) { + $view = 'console'; + return; } require_once('includes/Event.php');