Use Monitor class instead of old sql

pull/1207/head
Isaac Connor 2015-12-09 09:23:36 -05:00
parent f2065e2fcb
commit e6c9830728
1 changed files with 3 additions and 2 deletions

View File

@ -246,13 +246,14 @@ if ( !empty($action) )
if ( !empty($_REQUEST['mid']) && canView( 'Control', $_REQUEST['mid'] ) )
{
require_once( 'control_functions.php' );
require_once( 'Monitor.php' );
$mid = validInt($_REQUEST['mid']);
if ( $action == "control" )
{
$monitor = dbFetchOne( "select C.*,M.* from Monitors as M inner join Controls as C on (M.ControlId = C.Id) where M.Id = ?", NULL, array($mid) );
$monitor = new Monitor( $mid );
$ctrlCommand = buildControlCommand( $monitor );
sendControlCommand( $monitor['Id'], $ctrlCommand );
sendControlCommand( $monitor->Id(), $ctrlCommand );
}
elseif ( $action == "settings" )
{