From f153e9b8fbbfb885826d82fb91b349e45adfc745 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 20 Oct 2016 13:38:12 -0400 Subject: [PATCH] MontageReview should only be visisble to people who can view events. Fix running state --- web/index.php | 5 ++++- web/skins/classic/includes/functions.php | 10 +++++++--- web/skins/classic/views/console.php | 2 ++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/web/index.php b/web/index.php index 671307925..5dc3569c5 100644 --- a/web/index.php +++ b/web/index.php @@ -137,7 +137,10 @@ if ( ZM_OPT_USE_AUTH ) { require_once( 'includes/lang.php' ); require_once( 'includes/functions.php' ); -#$running = daemonCheck(); + +# Running is global but only do the daemonCheck if it is actually needed +$running = null; +#= daemonCheck(); #$states = dbFetchAll( 'SELECT * FROM States' ); #foreach ( $states as $state ) { #if ( $state['IsActive'] == 1 ) { diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index 9a7d2d755..b401f0de7 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -185,8 +185,10 @@ function getNavBarHTML() { global $VLANG; global $CLANG; global $VLANG; - global $status; - $running = daemonCheck(); + global $running; + if ( $running == null ) + $running = daemonCheck(); + $status = $running?translate('Running'):translate('Stopped'); global $user; global $bwArray; ?> @@ -220,7 +222,9 @@ function getNavBarHTML() { ?>
  • -
  • + + +
  • diff --git a/web/skins/classic/views/console.php b/web/skins/classic/views/console.php index 1f25fe8f4..cc956c205 100644 --- a/web/skins/classic/views/console.php +++ b/web/skins/classic/views/console.php @@ -22,6 +22,8 @@ $servers = Server::find_all(); require_once('includes/Storage.php'); $storage_areas = Storage::find_all(); $show_storage_areas = count($storage_areas) > 1 and canEdit( 'System' ) ? 1 : 0; +if ( $running == null ) + $running = daemonCheck(); $eventCounts = array( array(