mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
2008-04-17 Sancho Lerena <slerena@artica.es>
* lib/PandoraFMS/Config.pm: Shorten description in help. * lib/PandoraFMS/DB.pm: Data server module autocreation don't assign a id_module to tagente_module record. Fixed. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@809 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
1280425526
commit
68424bb75e
@ -1,3 +1,11 @@
|
||||
|
||||
2008-04-17 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* lib/PandoraFMS/Config.pm: Shorten description in help.
|
||||
|
||||
* lib/PandoraFMS/DB.pm: Data server module autocreation don't
|
||||
assign a id_module to tagente_module record. Fixed.
|
||||
|
||||
2008-04-16 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* lib/PandoraFMS/DB.pm: Small code optimization. Took a couple
|
||||
|
@ -51,7 +51,7 @@ my %pa_config;
|
||||
##########################################################################
|
||||
|
||||
sub help_screen {
|
||||
printf "\nSyntax: \n\n pandora_server < fullpathname to pandora server configuration file > [ options ] \n\n";
|
||||
printf "\nSyntax: \n\n pandora_server [ options ] < fullpathname to configuration file > \n\n";
|
||||
printf "Following options are optional : \n";
|
||||
printf " -v : Verbose mode activated, give more information in logfile \n";
|
||||
printf " -d : Debug mode activated, give extensive information in logfile \n";
|
||||
|
@ -1856,15 +1856,14 @@ sub crea_agente_modulo (%$$$$$$$) {
|
||||
$min = sqlWrap ($min);
|
||||
$nombre_modulo = sqlWrap ($nombre_modulo);
|
||||
|
||||
my $query = "INSERT INTO tagente_modulo (id_agente,id_tipo_modulo,nombre,max,min,descripcion) VALUES ($agente_id, $modulo_id, $nombre_modulo, $max, $min, $descripcion)";
|
||||
my $query = "INSERT INTO tagente_modulo (id_agente,id_tipo_modulo,nombre,max,min,descripcion, id_modulo) VALUES ($agente_id, $modulo_id, $nombre_modulo, $max, $min, $descripcion, 1)";
|
||||
if (($max eq "") and ($min eq "")) {
|
||||
$query = "INSERT INTO tagente_modulo (id_agente,id_tipo_modulo,nombre,descripcion) VALUES ($agente_id, $modulo_id, $nombre_modulo, $descripcion)";
|
||||
$query = "INSERT INTO tagente_modulo (id_agente,id_tipo_modulo,nombre,descripcion, id_modulo) VALUES ($agente_id, $modulo_id, $nombre_modulo, $descripcion, 1)";
|
||||
} elsif ($min eq "") {
|
||||
$query = "INSERT INTO tagente_modulo (id_agente,id_tipo_modulo,nombre,max,descripcion) VALUES ($agente_id, $modulo_id, $nombre_modulo, $max, $descripcion)";
|
||||
$query = "INSERT INTO tagente_modulo (id_agente,id_tipo_modulo,nombre,max,descripcion, id_modulo) VALUES ($agente_id, $modulo_id, $nombre_modulo, $max, $descripcion, 1)";
|
||||
} elsif ($min eq "") {
|
||||
$query = "INSERT INTO tagente_modulo (id_agente,id_tipo_modulo,nombre,min,descripcion) VALUES ($agente_id, $modulo_id, $nombre_modulo, $min, $descripcion)";
|
||||
$query = "INSERT INTO tagente_modulo (id_agente,id_tipo_modulo,nombre,min,descripcion, id_modulo) VALUES ($agente_id, $modulo_id, $nombre_modulo, $min, $descripcion, 1)";
|
||||
}
|
||||
logger( $pa_config, "DEBUG: Query for autocreate : $query ", 10);
|
||||
$dbh->do($query);
|
||||
return $dbh->{'mysql_insertid'};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user