From dae071bd10ca0fcddb13b593cc4cb8eb8e788bc4 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 17 Dec 2024 16:09:42 -0500 Subject: [PATCH] Don't show deleted monitors in zones --- web/skins/classic/views/zones.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/skins/classic/views/zones.php b/web/skins/classic/views/zones.php index c77737b12..70e715c8e 100644 --- a/web/skins/classic/views/zones.php +++ b/web/skins/classic/views/zones.php @@ -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)) ) {