Fixed error when selected in bulk actions agents edit any status, show all agents. Tiquet: #2261

This commit is contained in:
m-lopez-f 2015-06-01 13:41:31 +02:00
parent 0df14010c9
commit 589f054928
2 changed files with 3 additions and 2 deletions

View File

@ -112,7 +112,7 @@ if (is_ajax ()) {
// if group ID doesn't matter and $privilege is specified (like 'AW'),
// retruns all agents that current user has $privilege privilege for.
$agents = agents_get_group_agents(
array_keys (users_get_groups ($config["id_user"], $privilege, false)));
array_keys (users_get_groups ($config["id_user"], $privilege, false)),$filter,"none",false,$recursion);
}
else {
$agents = agents_get_group_agents($id_group, $filter, "none",

View File

@ -845,7 +845,8 @@ function agents_get_group_agents ($id_group = 0, $search = false, $case = "lower
$filter[] = "(critical_count = 0 AND warning_count = 0 AND unknown_count > 0)";
break;
case AGENT_STATUS_NOT_NORMAL:
$filter[] = "normal_count <> total_count";
$filter[] = "normal_count <> total_count
AND critical_count = 0 AND warning_count = 0";
break;
case AGENT_STATUS_NOT_INIT:
$filter[] = "notinit_count = total_count";