From d7a8947e053ef32a635a5fcb713fe6b3bb5a87fd Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 8 Feb 2022 13:33:02 -0500 Subject: [PATCH] Only include janus.js if needed --- web/skins/classic/views/cycle.php | 8 +++++++- web/skins/classic/views/montage.php | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/web/skins/classic/views/cycle.php b/web/skins/classic/views/cycle.php index ee9e03d4f..0744d26f7 100644 --- a/web/skins/classic/views/cycle.php +++ b/web/skins/classic/views/cycle.php @@ -193,5 +193,11 @@ xhtmlHeaders(__FILE__, translate('CycleWatch')); - +JanusEnabled() ) { +?> + + diff --git a/web/skins/classic/views/montage.php b/web/skins/classic/views/montage.php index a96e8a88e..b880d42e6 100644 --- a/web/skins/classic/views/montage.php +++ b/web/skins/classic/views/montage.php @@ -117,6 +117,7 @@ include('_monitor_filters.php'); $filterbar = ob_get_contents(); ob_end_clean(); +$need_janus = false; $monitors = array(); foreach ( $displayMonitors as &$row ) { if ( $row['Function'] == 'None' ) @@ -133,7 +134,10 @@ foreach ( $displayMonitors as &$row ) { if ( ! isset($heights[$row['Height']]) ) { $heights[$row['Height']] = $row['Height'].'px'; } - $monitors[] = new ZM\Monitor($row); + $monitor = $monitors[] = new ZM\Monitor($row); + if ($monitor->JanusEnabled()) { + $need_janus = true; + } } # end foreach Monitor xhtmlHeaders(__FILE__, translate('Montage')); @@ -319,6 +323,8 @@ foreach (array_reverse($zones) as $zone) { + +