From 5ef49024bf33edcb46bdb8100c3366b49a76e213 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 23 May 2024 12:53:53 +0200 Subject: [PATCH] #13783 change macros when no sync meta and node --- pandora_console/include/functions_events.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index ae5a814a3a..22ecada817 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -3841,6 +3841,11 @@ function events_get_response_target( include_once $config['homedir'].'/vendor/autoload.php'; + if (is_metaconsole() === true && (int) $server_id > 0) { + $node = new Node($server_id); + $node->connect(); + } + try { $eventObjt = new PandoraFMS\Event($event_id); } catch (Exception $e) { @@ -4238,6 +4243,10 @@ function events_get_response_target( ); } + if (is_metaconsole() === true && $server_id > 0) { + $node->disconnect(); + } + return $target; }