Merge branch '1069-bad-events-sql-when-are-grouped-by-agent-dev' into 'develop'

Added good match to tags list

See merge request !627
This commit is contained in:
slerena 2017-06-28 16:26:10 +02:00
commit 0150e9b555
1 changed files with 3 additions and 3 deletions

View File

@ -3394,9 +3394,9 @@ function events_sql_events_grouped_agents($id_agent, $server_id = -1,
$sql_post .= " AND (utimestamp <= " . $udate_to . ")";
}
}
//Search by tag
if (!empty($tag_with)) {
if (!empty($tag_with) && (io_safe_output($tag_with) != "[]") && (io_safe_output($tag_with) != "[\"0\"]")) {
$sql_post .= ' AND ( ';
$first = true;
foreach ($tag_with as $id_tag) {
@ -3406,7 +3406,7 @@ function events_sql_events_grouped_agents($id_agent, $server_id = -1,
}
$sql_post .= ' ) ';
}
if (!empty($tag_without)) {
if (!empty($tag_without) && (io_safe_output($tag_without) != "[]") && (io_safe_output($tag_with) != "[\"0\"]")) {
$sql_post .= ' AND ( ';
$first = true;
foreach ($tag_without as $id_tag) {