From c0dd2bcab6ac7e3bcddb56f5757f24aef31d560b Mon Sep 17 00:00:00 2001 From: enriquecd Date: Fri, 5 Oct 2018 12:57:25 +0200 Subject: [PATCH] Add status data to get_all_agents API response - #2881 --- pandora_console/include/functions_api.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index e66fb3dcaf..e0785419cf 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -1747,6 +1747,10 @@ function api_get_all_agents($thrash1, $thrash2, $other, $returnType) { $result_agents = $all_agents; } + foreach ($result_agents as $key => $value) { + $result_agents[$key]['status'] = agents_get_status($agent['id_agente'], true); + } + if (count($result_agents) > 0 and $result_agents !== false) { $data = array('type' => 'array', 'data' => $result_agents); returnData($returnType, $data, $separator);