2010-12-27 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/DB.pm, lib/PandoraFMS/Core.pm: Removed calls to safe_input related to tserver.name. Server names are not converted to HTML entities yet. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3716 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
0df6c57acd
commit
0012d83605
|
@ -1,3 +1,9 @@
|
||||||
|
2010-12-27 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* lib/PandoraFMS/DB.pm, lib/PandoraFMS/Core.pm: Removed calls to
|
||||||
|
safe_input related to tserver.name. Server names are not
|
||||||
|
converted to HTML entities yet.
|
||||||
|
|
||||||
2010-12-27 Ramon Novoa <rnovoa@artica.es>
|
2010-12-27 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* lib/PandoraFMS/Config.pm: Updated version strings for the 3.2
|
* lib/PandoraFMS/Config.pm: Updated version strings for the 3.2
|
||||||
|
|
|
@ -1193,12 +1193,12 @@ sub pandora_create_agent ($$$$$$$$$$;$$$$$) {
|
||||||
# Test if the optional positional parameters are defined or GIS is disabled
|
# Test if the optional positional parameters are defined or GIS is disabled
|
||||||
if (!defined ($timezone_offset) ) {
|
if (!defined ($timezone_offset) ) {
|
||||||
$agent_id = db_insert ($dbh, 'INSERT INTO tagente (`nombre`, `direccion`, `comentarios`, `id_grupo`, `id_os`, `server_name`, `intervalo`, `id_parent`, `modo`)
|
$agent_id = db_insert ($dbh, 'INSERT INTO tagente (`nombre`, `direccion`, `comentarios`, `id_grupo`, `id_os`, `server_name`, `intervalo`, `id_parent`, `modo`)
|
||||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, 1)', safe_input($agent_name), $address, $description, $group_id, $os_id, safe_input($server_name), $interval, $parent_id);
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, 1)', safe_input($agent_name), $address, $description, $group_id, $os_id, $server_name, $interval, $parent_id);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$agent_id = db_insert ($dbh, 'INSERT INTO tagente (`nombre`, `direccion`, `comentarios`, `id_grupo`, `id_os`, `server_name`, `intervalo`, `id_parent`,
|
$agent_id = db_insert ($dbh, 'INSERT INTO tagente (`nombre`, `direccion`, `comentarios`, `id_grupo`, `id_os`, `server_name`, `intervalo`, `id_parent`,
|
||||||
`timezone_offset`, `modo` ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, 1)', safe_input($agent_name), $address,
|
`timezone_offset`, `modo` ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, 1)', safe_input($agent_name), $address,
|
||||||
$description, $group_id, $os_id, safe_input($server_name), $interval, $parent_id, $timezone_offset);
|
$description, $group_id, $os_id, $server_name, $interval, $parent_id, $timezone_offset);
|
||||||
}
|
}
|
||||||
if (defined ($longitude) && defined ($latitude ) && $pa_config->{'activate_gis'} == 1 ) {
|
if (defined ($longitude) && defined ($latitude ) && $pa_config->{'activate_gis'} == 1 ) {
|
||||||
if (!defined($altitude)) {
|
if (!defined($altitude)) {
|
||||||
|
|
|
@ -115,7 +115,7 @@ sub get_server_id ($$$) {
|
||||||
|
|
||||||
my $rc = get_db_value ($dbh, "SELECT id_server FROM tserver
|
my $rc = get_db_value ($dbh, "SELECT id_server FROM tserver
|
||||||
WHERE name = ? AND server_type = ?",
|
WHERE name = ? AND server_type = ?",
|
||||||
safe_input($server_name), $server_type);
|
$server_name, $server_type);
|
||||||
return defined ($rc) ? $rc : -1;
|
return defined ($rc) ? $rc : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue