From e7b14143ed9876c2da6ec9762e1f3c89704f42f7 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 9 Mar 2017 10:57:03 +0100 Subject: [PATCH] add new macro _homeurl_ --- pandora_server/lib/PandoraFMS/Config.pm | 3 +++ pandora_server/lib/PandoraFMS/Core.pm | 1 + 2 files changed, 4 insertions(+) diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 760ac38475..59ff267751 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -167,6 +167,9 @@ sub pandora_get_sharedconfig ($$) { $pa_config->{'replication_limit'} = pandora_get_tconfig_token ($dbh, 'replication_limit', 1000); $pa_config->{'include_agents'} = pandora_get_tconfig_token ($dbh, 'include_agents', 0); + #Public url + $pa_config->{'public_url'} = pandora_get_tconfig_token ($dbh, 'public_url', 'http://localhost/pandora_console'); + if ($pa_config->{'include_agents'} eq '') { $pa_config->{'include_agents'} = 0; } diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 467d28723c..92f213a9c9 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -985,6 +985,7 @@ sub pandora_execute_action ($$$$$$$$$;$) { _timezone_ => strftime ("%Z", localtime()), _data_ => $data, _prevdata_ => undef, + _homeurl_ => $pa_config->{'public_url'}, _alert_name_ => $alert->{'name'}, _alert_description_ => $alert->{'description'}, _alert_threshold_ => $alert->{'time_threshold'},