From b78ce0fea5ebde06821eebeb832daa979907fbcb Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 6 Nov 2024 12:20:09 -0500 Subject: [PATCH] Give an id to the newGroup[MonitorIds] select can look it up more efficiently when applying chosen rules --- web/ajax/modals/group.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/web/ajax/modals/group.php b/web/ajax/modals/group.php index d11dfb1b5..061607faa 100644 --- a/web/ajax/modals/group.php +++ b/web/ajax/modals/group.php @@ -42,8 +42,7 @@ function parentGrpSelect($newGroup) { } $kids = get_children($newGroup); - if ( $newGroup->Id() ) - $kids[] = $newGroup->Id(); + if ( $newGroup->Id() ) $kids[] = $newGroup->Id(); $sql = 'SELECT Id,Name FROM `Groups`'.(count($kids)?' WHERE Id NOT IN ('.implode(',',array_map(function(){return '?';}, $kids)).')' : '').' ORDER BY Name'; $options = array(''=>'None'); @@ -61,7 +60,7 @@ function monitorList($newGroup) { $monitorIds = $newGroup->MonitorIds(); foreach ( $monitors as $monitor ) { if ( visibleMonitor($monitor['Id']) ) { - $result .= ''.PHP_EOL; + $result .= ''.PHP_EOL; } } @@ -112,7 +111,7 @@ if ( !empty($_REQUEST['gid']) ) { -