From 7a425e7e965e9f2af832dfdd2ef1a26a0c5dcb64 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 20 Jun 2019 21:33:38 +0200 Subject: [PATCH] qa event viewer latest fixes --- pandora_console/include/functions_events.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 3963c172b7..892cf22077 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -794,21 +794,19 @@ function events_get_all( ); } else { $children = groups_get_children($groups); - $_groups = []; + $_groups = [ $groups ]; if (!empty($children)) { foreach ($children as $child) { $_groups[] = (int) $child['id_grupo']; } - - $groups = $_groups; - } else { - $groups = [ $groups ]; } + $groups = $_groups; + $sql_filters[] = sprintf( - ' AND (te.id_grupo IN (%s) OR tasg.id_group IN (%s)', - join(',', array_keys($groups)), - join(',', array_keys($groups)) + ' AND (te.id_grupo IN (%s) OR tasg.id_group IN (%s))', + join(',', $groups), + join(',', $groups) ); } } @@ -1185,8 +1183,8 @@ function events_get_all( if (is_array($groups)) { $tgrupo_join_filters[] = sprintf( ' AND (tg.id_grupo IN (%s) OR tasg.id_group IN (%s))', - join(', ', array_keys($groups)), - join(', ', array_keys($groups)) + join(', ', $groups), + join(', ', $groups) ); } else { $tgrupo_join_filters[] = sprintf(