prevent error message in log when Enabled is not checked
This commit is contained in:
parent
856a8ce1d0
commit
4524a61a50
|
@ -260,8 +260,7 @@ if ( !empty($action) )
|
||||||
$monitor = dbFetchOne( "SELECT * FROM Monitors WHERE Id=?", NULL, array($mid) );
|
$monitor = dbFetchOne( "SELECT * FROM Monitors WHERE Id=?", NULL, array($mid) );
|
||||||
|
|
||||||
$newFunction = validStr($_REQUEST['newFunction']);
|
$newFunction = validStr($_REQUEST['newFunction']);
|
||||||
$newEnabled = validStr($_REQUEST['newEnabled']);
|
$newEnabled = isset( $_REQUEST['newEnabled'] ) and $_REQUEST['newEnabled'] != "1" ? "0" : "1";
|
||||||
if ($newEnabled != "1") $newEnabled = "0";
|
|
||||||
$oldFunction = $monitor['Function'];
|
$oldFunction = $monitor['Function'];
|
||||||
$oldEnabled = $monitor['Enabled'];
|
$oldEnabled = $monitor['Enabled'];
|
||||||
if ( $newFunction != $oldFunction || $newEnabled != $oldEnabled )
|
if ( $newFunction != $oldFunction || $newEnabled != $oldEnabled )
|
||||||
|
|
Loading…
Reference in New Issue