From f1938a0fdb501a137018098a6144995f848eadeb Mon Sep 17 00:00:00 2001 From: "manuel.montes" Date: Mon, 23 Jul 2018 11:52:17 +0200 Subject: [PATCH] Agent filtering by alias --- pandora_console/include/functions_api.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 680181c380..5a41e079e5 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -7230,10 +7230,11 @@ function otherParameter2Filter($other, $return_as_array = false) { $idAgent = null; if (isset($other['data'][2]) && $other['data'][2] != '') { - $idAgent = agents_get_agent_id($other['data'][2]); + $idAgents = agents_get_agent_id_by_alias($other['data'][2]); if (!empty($idAgent)) { - $filter['id_agente'] = $idAgent; + + $filter[] = "id_agente IN (" . explode(",", $idAgents) .")"; } else { $filter['sql'] = "1=0";