Enable/Disable Snapshots based on ZM_FEATURES_SNAPSHOTS config setting
This commit is contained in:
parent
9ee5e983d6
commit
0b6e414998
|
@ -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 .= '<li id="getSnapshotsHTML" class="nav-item dropdown"><a class="nav-link'.$class.'" href="?view=snapshots">' .translate('Snapshots'). '</a></li>'.PHP_EOL;
|
||||
}
|
||||
|
|
|
@ -200,10 +200,12 @@ if ( canView('System') ) {
|
|||
<button type="button" value="Cancel" data-on-click-this="cancel_layout"><?php echo translate('Cancel') ?></button>
|
||||
</span>
|
||||
|
||||
<?php if (defined('ZM_FEATURES_SNAPSHOTS') and ZM_FEATURES_SNAPSHOTS) { ?>
|
||||
<button type="button" name="snapshotBtn" data-on-click-this="takeSnapshot">
|
||||
<i class="material-icons md-18">camera_enhance</i>
|
||||
<?php echo translate('Snapshot') ?>
|
||||
</button>
|
||||
<?php } ?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
if (!canView('Snapshots')) {
|
||||
$view = 'error';
|
||||
return;
|
||||
} else if (!ZM_FEATURES_SNAPSHOTS) {
|
||||
$view = 'console';
|
||||
return;
|
||||
}
|
||||
|
||||
require_once('includes/Event.php');
|
||||
|
|
Loading…
Reference in New Issue