diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index d999663001..86f5499399 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2012-04-09 Juan Manuel Ramon + + * include/javascript/pandora.js + include/ajax/agent.php: Fixed autocomplete agent functionality when + metaconsole is activated. + + Fixes: #3514539 + 2012-04-09 Juan Manuel Ramon * godmode/menu.php: Fixed first entry in godmode menu. diff --git a/pandora_console/include/ajax/agent.php b/pandora_console/include/ajax/agent.php index a564002869..e36bf5aa93 100644 --- a/pandora_console/include/ajax/agent.php +++ b/pandora_console/include/ajax/agent.php @@ -187,7 +187,7 @@ if ($search_agents_2 && ($config['metaconsole'] == 0)) { return; } -elseif ($search_agents && ($config['metaconsole'] == 1)) { +elseif ($search_agents_2 && ($config['metaconsole'] == 1)) { $servers = db_get_all_rows_sql ("SELECT * FROM tmetaconsole_setup"); if (!isset($servers)) { return; diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index 1b6f9cd097..19bc8e187e 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -457,6 +457,11 @@ function agent_module_autocomplete (id_agent_name, id_agent_id, id_agent_module_ var agent_name = ui.item.name; var agent_id = ui.item.id; var server_name = ui.item.ip; + if (agent_name.indexOf("(") != -1){ + var server_name_temp = agent_name.split('('); + server_name_temp1 = server_name_temp[1].split(')'); + server_name = server_name_temp1[0]; + } //Put the name $(this).val(agent_name);