2013-05-01 Miguel de Dios <miguel.dedios@artica.es>

* godmode/agentes/agent_manager.php: improved the source code style.
	
	* godmode/agentes/configurar_agente.php: fixed the agents address
	with white spaces in the both sides.
	
	Fixes: #2171




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8094 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-05-01 12:09:57 +00:00
parent 27427c0748
commit 21d1e9eef8
3 changed files with 17 additions and 2 deletions

View File

@ -1,3 +1,12 @@
2013-05-01 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/agent_manager.php: improved the source code style.
* godmode/agentes/configurar_agente.php: fixed the agents address
with white spaces in the both sides.
Fixes: #2171
2013-05-01 Miguel de Dios <miguel.dedios@artica.es>
* extensions/system_info.php, extensions/agents_modules.php,

View File

@ -96,7 +96,7 @@ enterprise_include ('godmode/agentes/agent_manager.php');
require_once ('include/functions_servers.php');
require_once ('include/functions_gis.php');
require_once($config['homedir'] . "/include/functions_agents.php");
require_once ($config['homedir'].'/include/functions_users.php');
require_once ($config['homedir'] . '/include/functions_users.php');
ui_require_javascript_file('openlayers.pandora');

View File

@ -74,6 +74,8 @@ $maximo = 0;
$minimo = 0;
$nombre_agente = "";
$direccion_agente = get_parameter('direccion', '');
$direccion_agente = trim(io_safe_output($direccion_agente));
$direccion_agente = io_safe_input($direccion_agente);
$intervalo = SECONDS_5MINUTES;
$ff_interval = 0;
$quiet_module = 0;
@ -145,6 +147,8 @@ $create_agent = (bool)get_parameter('create_agent');
if ($create_agent) {
$nombre_agente = (string) get_parameter_post("agente",'');
$direccion_agente = (string) get_parameter_post("direccion",'');
$direccion_agente = trim(io_safe_output($direccion_agente));
$direccion_agente = io_safe_input($direccion_agente);
$grupo = (int) get_parameter_post ("grupo");
$intervalo = (string) get_parameter_post ("intervalo", SECONDS_5MINUTES);
$comentarios = (string) get_parameter_post ("comentarios", '');
@ -261,7 +265,7 @@ if ($id_agente) {
. html_print_image ("images/gm_modules.png", true, array ("title" =>__('Modules')))
. '</a>';
if($tab == 'module')
if ($tab == 'module')
$moduletab['active'] = true;
else
$moduletab['active'] = false;
@ -520,6 +524,8 @@ if ($update_agent) { // if modified some agent paramenter
$id_agente = (int) get_parameter_post ("id_agente");
$nombre_agente = str_replace('`','&lsquo;',(string) get_parameter_post ("agente", ""));
$direccion_agente = (string) get_parameter_post ("direccion", '');
$direccion_agente = trim(io_safe_output($direccion_agente));
$direccion_agente = io_safe_input($direccion_agente);
$address_list = (string) get_parameter_post ("address_list", '');
if ($address_list != $direccion_agente && $direccion_agente == agents_get_address ($id_agente) && $address_list != agents_get_address ($id_agente)) {
//If we selected another IP in the drop down list to be 'primary':