diff --git a/web/zm_actions.php b/web/zm_actions.php index 2161f12f1..99fddc29f 100644 --- a/web/zm_actions.php +++ b/web/zm_actions.php @@ -126,7 +126,7 @@ if ( isset($action) ) $filter_parms[] = "sort_asc=$sort_asc"; $filter_parms[] = "limit=$limit"; $filter_query_string = join( '&', $filter_parms ); - simpleQuery( "replace into Filters set Name = '$filter_name', Query = '$filter_query_string', AutoArchive = '$auto_archive', AutoVideo = '$auto_video', AutoUpload = '$auto_upload', AutoEmail = '$auto_email', AutoMessage = '$auto_message', AutoExecute = '$auto_execute', AutoDelete = '$auto_delete'" ); + simpleQuery( "replace into Filters set Name = '$filter_name', Query = '$filter_query_string', AutoArchive = '$auto_archive', AutoVideo = '$auto_video', AutoUpload = '$auto_upload', AutoEmail = '$auto_email', AutoMessage = '$auto_message', AutoExecute = '$auto_execute', AutoDelete = '$auto_delete'" ); $refresh_parent = true; } } @@ -994,8 +994,11 @@ if ( isset($action) ) $monitor['Function'] = $new_function; if ( $cookies ) session_write_close(); - zmcControl( $monitor, true ); - zmaControl( $monitor, true ); + if ( daemonCheck() ) + { + zmcControl( $monitor, true ); + zmaControl( $monitor, true ); + } $refresh_parent = true; } } @@ -1035,7 +1038,10 @@ if ( isset($action) ) //echo "$sql"; simpleQuery( $sql ); if ( $cookies ) session_write_close(); - zmaControl( $mid, true ); + if ( daemonCheck() ) + { + zmaControl( $mid, true ); + } $refresh_parent = true; } } @@ -1157,8 +1163,11 @@ if ( isset($action) ) $monitor = mysql_fetch_assoc( $result ); fixDevices(); if ( $cookies ) session_write_close(); - zmcControl( $monitor, true ); - zmaControl( $monitor, true ); + if ( daemonCheck() ) + { + zmcControl( $monitor, true ); + zmaControl( $monitor, true ); + } //daemonControl( 'restart', 'zmwatch.pl' ); $refresh_parent = true; } @@ -1201,7 +1210,10 @@ if ( isset($action) ) if ( $deleted_zid ) { if ( $cookies ) session_write_close(); - zmaControl( $mid, true ); + if ( daemonCheck() ) + { + zmaControl( $mid, true ); + } $refresh_parent = true; } } diff --git a/web/zm_funcs.php b/web/zm_funcs.php index 8b0d59734..06f60f74f 100644 --- a/web/zm_funcs.php +++ b/web/zm_funcs.php @@ -584,9 +584,16 @@ function daemonStatus( $daemon, $args=false ) { global $daemon_status; - initDaemonStatus(); + if ( daemonCheck() ) + { + initDaemonStatus(); + } + else + { + $daemon_status = ""; + } - $string .= "$daemon"; + $string = "$daemon"; if ( $args ) $string .= " $args"; return( strpos( $daemon_status, "'$string' running" ) !== false ); diff --git a/web/zm_html_view_console.php b/web/zm_html_view_console.php index 7d2480a82..2250258b5 100644 --- a/web/zm_html_view_console.php +++ b/web/zm_html_view_console.php @@ -245,7 +245,7 @@ else if ( canView( 'Stream' ) && $cycle_count > 1 ) { ?> -= $zmSlangCycle ?> / = $zmSlangMontage ?> += makeLink( "javascript: newWindow( '$PHP_SELF?view=cycle&group=$cgroup', 'zmCycle$cgroup', ".($montage_width+$jws['cycle']['w']).", ".($montage_height+$jws['cycle']['h'])." );", $zmSlangCycle, $running ) ?> / = makeLink( "javascript: newWindow( '$PHP_SELF?view=montage&group=$cgroup', 'zmMontage$cgroup', ".(($montage_cols*$montage_width)+$jws['montage']['w']).", ".(($montage_rows*((ZM_WEB_COMPACT_MONTAGE?4:40)+$montage_height))+$jws['montage']['h'])." );", $zmSlangMontage, $running ) ?> -