Ternary condition is added

Former-commit-id: 345cfb2ef1e211234a5fc4cc35f0faaaab3360c8
This commit is contained in:
marcos.alconada 2019-03-28 15:37:52 +01:00
parent 8160983e36
commit c45d5f2f70
1 changed files with 4 additions and 4 deletions

View File

@ -181,7 +181,7 @@ function events_get_events_no_grouped(
$table = events_get_events_table($meta, $history); $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); $events = db_get_all_rows_sql($sql, $history_db);
@ -1628,7 +1628,7 @@ function events_get_agent(
} }
if (is_metaconsole() && $id_server) { if (is_metaconsole() && $id_server) {
$sql_where .= ' AND server_id = '.$id_server; $sql_where .= ' AND server_id = 0';
} }
if ($show_summary_group) { if ($show_summary_group) {
@ -1636,7 +1636,7 @@ function events_get_agent(
$sql_where, $sql_where,
0, 0,
1000, 1000,
is_metaconsole(), is_metaconsole();
false, false,
false, false,
$history $history
@ -1646,7 +1646,7 @@ function events_get_agent(
$sql_where, $sql_where,
0, 0,
1000, 1000,
is_metaconsole(), (is_metaconsole() && $id_server) ? true : false,
false, false,
false, false,
$history $history