Merge branch '2138-En-la-API-se-esta-usando-el-nombre-del-agente-para-filtrar-en-lugar-del-alias' into 'develop'

Agent filtering by alias

See merge request artica/pandorafms!1627
This commit is contained in:
vgilc 2018-10-01 12:30:09 +02:00
commit d9a8e30229
1 changed files with 3 additions and 2 deletions

View File

@ -7080,10 +7080,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";