From 2f27818e5b46bb4f04ed0dfe6829a1bf9ad9af3b Mon Sep 17 00:00:00 2001 From: Laercio Motta Date: Thu, 31 Mar 2016 09:23:01 -0300 Subject: [PATCH 1/5] Improve test multiserver restart cam. Test if correct server from camera edit settings. --- web/includes/functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/includes/functions.php b/web/includes/functions.php index 14a8d778e..3cab8366f 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -982,6 +982,7 @@ function daemonControl( $command, $daemon=false, $args=false ) function zmcControl( $monitor, $mode=false ) { + if (ZM_SERVER_ID == $monitor['ServerId']) { $row = NULL; if ( $monitor['Type'] == "Local" ) { @@ -1007,10 +1008,12 @@ function zmcControl( $monitor, $mode=false ) } daemonControl( "start", "zmc", $zmcArgs ); } + } } function zmaControl( $monitor, $mode=false ) { + if (ZM_SERVER_ID == $monitor['ServerId']) { if ( !is_array( $monitor ) ) { $monitor = dbFetchOne( "select C.*, M.* from Monitors as M left join Controls as C on (M.ControlId = C.Id ) where M.Id=?", NULL, array($monitor) ); @@ -1055,6 +1058,7 @@ function zmaControl( $monitor, $mode=false ) daemonControl( "reload", "zma", "-m ".$monitor['Id'] ); } } + } } function initDaemonStatus() From ad912a6c6bd79cbaed3f9edee324a6af63e0981a Mon Sep 17 00:00:00 2001 From: Laercio Motta Date: Thu, 31 Mar 2016 09:45:13 -0300 Subject: [PATCH 2/5] Improve test multiserver restart camera. (FIX) Check if the server is correctly before restart cam and multiserver is activate. --- web/includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/includes/functions.php b/web/includes/functions.php index 3cab8366f..800f03f4d 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -982,7 +982,7 @@ function daemonControl( $command, $daemon=false, $args=false ) function zmcControl( $monitor, $mode=false ) { - if (ZM_SERVER_ID == $monitor['ServerId']) { + if ( (!ZM_SERVER) or ( ZM_SERVER==$monitor[ServerId}) ) { $row = NULL; if ( $monitor['Type'] == "Local" ) { @@ -1013,7 +1013,7 @@ function zmcControl( $monitor, $mode=false ) function zmaControl( $monitor, $mode=false ) { - if (ZM_SERVER_ID == $monitor['ServerId']) { + if ( (!ZM_SERVER) or ( ZM_SERVER==$monitor[ServerId}) ) { if ( !is_array( $monitor ) ) { $monitor = dbFetchOne( "select C.*, M.* from Monitors as M left join Controls as C on (M.ControlId = C.Id ) where M.Id=?", NULL, array($monitor) ); From 2233747fcb3b28ede038458ae5394f87d219d105 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 4 Apr 2016 11:38:16 -0400 Subject: [PATCH 3/5] add a missing t --- web/skins/classic/includes/control_functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/skins/classic/includes/control_functions.php b/web/skins/classic/includes/control_functions.php index 0c8c31fe4..c22c39da6 100644 --- a/web/skins/classic/includes/control_functions.php +++ b/web/skins/classic/includes/control_functions.php @@ -243,7 +243,7 @@ function controlPanTilt( $monitor, $cmds ) ob_start(); ?>
-
+
CanPan; From 9dfe71ceb8d452b99f3759481869b21223cc4b57 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 4 Apr 2016 11:39:12 -0400 Subject: [PATCH 4/5] Always show events and always show ptz controls. Also clean out some commented out cruft --- web/skins/classic/views/watch.php | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/web/skins/classic/views/watch.php b/web/skins/classic/views/watch.php index 102ae41ac..160234cf7 100644 --- a/web/skins/classic/views/watch.php +++ b/web/skins/classic/views/watch.php @@ -33,14 +33,7 @@ if ( ! visibleMonitor( $mid ) ) { return; } -$sql = 'SELECT C.*, M.* FROM Monitors AS M LEFT JOIN Controls AS C ON (M.ControlId = C.Id ) WHERE M.Id = ?'; $monitor = new Monitor( $mid ); -#dbFetchOne( $sql, NULL, array( $_REQUEST['mid'] ) ); - -if ( isset($_REQUEST['showControls']) ) - $showControls = validInt($_REQUEST['showControls']); -else - $showControls = (canView( 'Control' ) && ($monitor->DefaultView() == 'Control')); $showPtzControls = ( ZM_OPT_CONTROL && $monitor->Controllable() && canView( 'Control' ) ); @@ -82,23 +75,6 @@ xhtmlHeaders( __FILE__, $monitor->Name()." - ".translate('Feed') );