From 8747f5c2b3c67748c8de2582535a61edd681ea19 Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Mon, 4 Jun 2012 14:18:21 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6412 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/include/ajax/agent.php | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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) {