From f01c611520dcc747fa12278cca905473c1962b4e Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Mon, 21 Nov 2011 16:04:12 +0000 Subject: [PATCH] 2011-11-21 Juan Manuel Ramon * lib/PandoraFMS/Core.pm: Changed tag field in events insertion from tag name to tag name and URL. Pending to change it for Oracle and PostgreSQL. Fixes: #3439792 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5148 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 8 ++++++++ pandora_server/lib/PandoraFMS/Core.pm | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 8a603d009e..5a9949b845 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,11 @@ +2011-11-21 Juan Manuel Ramon + + * lib/PandoraFMS/Core.pm: Changed tag field in events insertion from + tag name to tag name and URL. Pending to change it for Oracle and + PostgreSQL. + + Fixes: #3439792 + 2011-11-17 Tomas Palacios * conf/pandora_server.conf: Removed checksum token since it is diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 003eb169e7..712405cc5d 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -2556,8 +2556,9 @@ Get a list of module tags in the format: |tag|tag| ... |tag| ########################################################################## sub pandora_get_module_tags ($$$) { my ($pa_config, $dbh, $id_agentmodule) = @_; - - my @tags = get_db_rows ($dbh, 'SELECT ttag.name FROM ttag, ttag_module + + #TODO: Fix for Oracle and PostgreSQL + my @tags = get_db_rows ($dbh, 'SELECT concat(ttag.name, " ", ttag.url) name_url FROM ttag, ttag_module WHERE ttag.id_tag = ttag_module.id_tag AND ttag_module.id_agente_modulo = ?', $id_agentmodule); @@ -2566,7 +2567,7 @@ sub pandora_get_module_tags ($$$) { my $tag_string = ''; foreach my $tag (@tags) { - $tag_string .= $tag->{'name'} . ','; + $tag_string .= $tag->{'name_url'} . ','; } # Remove the trailing ','