From c45d5f2f70147a0b249f017322be8bd05bf7d21e Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Thu, 28 Mar 2019 15:37:52 +0100 Subject: [PATCH 1/2] Ternary condition is added Former-commit-id: 345cfb2ef1e211234a5fc4cc35f0faaaab3360c8 --- pandora_console/include/functions_events.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index dc69af7baf..772faed829 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -181,7 +181,7 @@ function events_get_events_no_grouped( $table = events_get_events_table($meta, $history); - $sql = 'SELECT * FROM '.$table.' te WHERE 1=1 '.$sql_post; + $sql = 'SELECT * FROM '.$table.' WHERE 1=1 '.$sql_post; $events = db_get_all_rows_sql($sql, $history_db); @@ -1628,7 +1628,7 @@ function events_get_agent( } if (is_metaconsole() && $id_server) { - $sql_where .= ' AND server_id = '.$id_server; + $sql_where .= ' AND server_id = 0'; } if ($show_summary_group) { @@ -1636,7 +1636,7 @@ function events_get_agent( $sql_where, 0, 1000, - is_metaconsole(), + is_metaconsole(); false, false, $history @@ -1646,7 +1646,7 @@ function events_get_agent( $sql_where, 0, 1000, - is_metaconsole(), + (is_metaconsole() && $id_server) ? true : false, false, false, $history From 82bfd624ba9ff49b885de206a23d9bcc34190a19 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Thu, 28 Mar 2019 15:40:26 +0100 Subject: [PATCH 2/2] Ternary condition is added Former-commit-id: 35b1b34d83ffa89fed34529a58cef6e586f086b1 --- pandora_console/include/functions_events.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 772faed829..67e0c906e9 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -181,7 +181,7 @@ function events_get_events_no_grouped( $table = events_get_events_table($meta, $history); - $sql = 'SELECT * FROM '.$table.' WHERE 1=1 '.$sql_post; + $sql = 'SELECT * FROM '.$table.' te WHERE 1=1 '.$sql_post; $events = db_get_all_rows_sql($sql, $history_db); @@ -1628,7 +1628,7 @@ function events_get_agent( } if (is_metaconsole() && $id_server) { - $sql_where .= ' AND server_id = 0'; + $sql_where .= ' AND server_id = '.$id_server; } if ($show_summary_group) { @@ -1636,7 +1636,7 @@ function events_get_agent( $sql_where, 0, 1000, - is_metaconsole(); + is_metaconsole(), false, false, $history