Merge branch 'ent-7411-Error-SQL-en-items-Module-event-report-y-Agent-event-report-metaconsola' into 'develop'

Fixed errors SQL metaconsole events

See merge request artica/pandorafms!4076
This commit is contained in:
Daniel Rodriguez 2021-04-28 08:44:26 +00:00
commit e117fd8fd0
1 changed files with 4 additions and 8 deletions

View File

@ -3013,15 +3013,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();
}
@ -3156,7 +3152,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;
}
@ -3173,7 +3169,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
);
}