From 8324655aabbdfb87d7cf2b258e3a99c7a1692e4c Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Tue, 27 Apr 2021 10:03:34 +0200 Subject: [PATCH] Fixed errors SQL metaconsole events --- pandora_console/include/functions_events.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index ea85ed589b..4afa83fe88 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -3006,15 +3006,11 @@ function events_get_agent( ) { global $config; - if (!is_numeric($date)) { + if (is_numeric($date) === false) { $date = time_w_fixed_tz($date); } - if (is_metaconsole() && $events_group === false) { - $id_server = true; - } - - if (empty($date)) { + if (empty($date) === true) { $date = get_system_time(); } @@ -3149,7 +3145,7 @@ function events_get_agent( } } - if (is_metaconsole() && $id_server) { + if (is_metaconsole() === true && empty($id_server) === false) { $sql_where .= ' AND server_id = '.$id_server; } @@ -3166,7 +3162,7 @@ function events_get_agent( } else { return events_get_events_no_grouped( $sql_where, - (is_metaconsole() === true && $id_server === false) ? true : false, + (is_metaconsole() === true && empty($id_server) === false) ? true : false, $history ); }