diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 003eaa740a..1bceda94fc 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2012-06-04 Juan Manuel Ramon + + * include/ajax/agent.php: Fixed function search_agent when + metaconsole is activated an one of the nodes return no agents. + 2012-06-04 Vanessa Gil * godmode/alerts/alert_list.list.php: Fixed bug: diff --git a/pandora_console/include/ajax/agent.php b/pandora_console/include/ajax/agent.php index 68cea2f4a3..1ba6d3920e 100644 --- a/pandora_console/include/ajax/agent.php +++ b/pandora_console/include/ajax/agent.php @@ -125,7 +125,7 @@ elseif ($search_agents && ($config['metaconsole'] == 1)) { $agents = agents_get_agents ($filter, array ('id_agente','nombre', 'direccion')); if ($agents === false) - return; + continue; foreach ($agents as $agent) { echo io_safe_output($agent['nombre']) . " (" . io_safe_output($server['server_name']) . ") " . "|" . io_safe_output($agent['id_agente']) . "|" . io_safe_output($server['server_name']) . "|" . io_safe_output($agent['direccion']) . "|". "\n"; } @@ -225,7 +225,7 @@ elseif ($search_agents_2 && ($config['metaconsole'] == 1)) { $agents = agents_get_agents ($filter, array ('id_agente','nombre', 'direccion')); if ($agents === false) - $agents = array(); + continue; $data = array(); foreach ($agents as $agent) {