Don't show deleted monitors in zones

pull/4131/merge
Isaac Connor 2024-12-17 16:09:42 -05:00
parent 6ec0b5a1dc
commit dae071bd10
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ if ( isset($_REQUEST['mid']) ) {
} else if ( isset($_REQUEST['mids']) ) {
$mids = array_map(function($mid){return validCardinal($mid);}, $_REQUEST['mids'] );
} else {
$mids = dbFetchAll('SELECT Id FROM Monitors'.($user->unviewableMonitorIds() ? ' WHERE Id IN ('.implode(',', array_map(function(){return '?';}, $user->viewableMonitorIds())).')' : ''), 'Id', $user->viewableMonitorIds());
$mids = dbFetchAll('SELECT Id FROM Monitors WHERE Deleted=false'.($user->unviewableMonitorIds() ? ' AND Id IN ('.implode(',', array_map(function(){return '?';}, $user->viewableMonitorIds())).')' : ''), 'Id', $user->viewableMonitorIds());
}
if ( !($mids and count($mids)) ) {