From b9204d30acda84e89cd7dcbe40fbfab89f2a825b Mon Sep 17 00:00:00 2001 From: ramonn Date: Wed, 16 Feb 2011 16:50:19 +0000 Subject: [PATCH] 2011-02-16 Ramon Novoa * lib/PandoraFMS/DataServer.pm: Do not update the module description if it's empty. Fixes bug #3162637. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3880 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/lib/PandoraFMS/DataServer.pm | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index ef1a1c01ad..4f84f6d9fb 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2011-02-16 Ramon Novoa + + * lib/PandoraFMS/DataServer.pm: Do not update the module description + if it's empty. Fixes bug #3162637. + 2011-02-16 Junichi Satoh * FreeBSD/tentacle_server: Added a filter option. diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index 52a0ec98e5..afba90a7d7 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -567,7 +567,7 @@ sub update_module_configuration ($$$$) { $module->{'module_interval'} != $module_conf->{'module_interval'}) { logger($pa_config, "Updating configuration for module '" . $module->{'nombre'} . "'.", 10); db_do ($dbh, 'UPDATE tagente_modulo SET min = ?, max = ?, descripcion = ?, post_process = ?, module_interval = ? - WHERE id_agente_modulo = ?', $module_conf->{'min'}, $module_conf->{'max'}, $module_conf->{'descripcion'}, + WHERE id_agente_modulo = ?', $module_conf->{'min'}, $module_conf->{'max'}, $module_conf->{'descripcion'} eq '' ? $module->{'descripcion'} : $module_conf->{'descripcion'}, $module_conf->{'post_process'}, $module_conf->{'module_interval'}, $module->{'id_agente_modulo'}); return; }