Update state action, replacing Function with Recording, Analysing, Capturing. Redirect to console instead of switching view.
This commit is contained in:
parent
aad79d3407
commit
38c9ac1521
|
@ -25,16 +25,15 @@ if ( !canEdit('System') ) {
|
|||
}
|
||||
if ($action == 'state') {
|
||||
if (!empty($_REQUEST['runState'])) {
|
||||
//if ( $cookies ) session_write_close();
|
||||
packageControl($_REQUEST['runState']);
|
||||
$refreshParent = true;
|
||||
}
|
||||
} else if ($action == 'save') {
|
||||
if (!empty($_REQUEST['runState']) || !empty($_REQUEST['newState'])) {
|
||||
$sql = 'SELECT `Id`,`Function`,`Enabled` FROM Monitors ORDER BY Id';
|
||||
$sql = 'SELECT `Id`,`Capturing`,`Analysing`,`Recording` FROM `Monitors` ORDER BY `Id`';
|
||||
$definitions = array();
|
||||
foreach (dbFetchAll($sql) as $monitor ) {
|
||||
$definitions[] = $monitor['Id'].':'.$monitor['Function'].':'.$monitor['Enabled'];
|
||||
$definitions[] = $monitor['Id'].':'.$monitor['Capturing'].':'.$monitor['Analysing'].':'.$monitor['Recording'];
|
||||
}
|
||||
$definition = join(',', $definitions);
|
||||
if ( $_REQUEST['newState'] )
|
||||
|
@ -45,5 +44,5 @@ if ( $action == 'state' ) {
|
|||
if (isset($_REQUEST['runState']))
|
||||
dbQuery('DELETE FROM `States` WHERE `Name`=?', array($_REQUEST['runState']));
|
||||
}
|
||||
$view = 'console';
|
||||
$redirect = '?view=console';
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue