From 7bd37b16fa90b8d9ca46875543c8a4e0a08cdbaa Mon Sep 17 00:00:00 2001 From: Kevin Duret Date: Fri, 25 Oct 2019 13:07:00 +0200 Subject: [PATCH 1/2] fix(remote-server): export properly trap matching --- www/class/config-generate-remote/Relations/TrapsMatching.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/class/config-generate-remote/Relations/TrapsMatching.php b/www/class/config-generate-remote/Relations/TrapsMatching.php index 932b9a0c70c..837e98715ca 100644 --- a/www/class/config-generate-remote/Relations/TrapsMatching.php +++ b/www/class/config-generate-remote/Relations/TrapsMatching.php @@ -22,6 +22,7 @@ use \PDO; use ConfigGenerateRemote\Abstracts\AbstractObject; +use ConfigGenerateRemote\ServiceCategory; class TrapsMatching extends AbstractObject { @@ -106,7 +107,7 @@ public function generateObject($trapId, $trapMatchCache) continue; } $this->generateObjectInFile($value, $value['tmo_id']); - serviceCategory::getInstance($this->dependencyInjector)->generateObject($value['severity_id']); + ServiceCategory::getInstance($this->dependencyInjector)->generateObject($value['severity_id']); } } From b8a14ad38fbf2f8ab367a4075fc5d25809039266 Mon Sep 17 00:00:00 2001 From: Kevin Duret Date: Fri, 25 Oct 2019 14:32:30 +0200 Subject: [PATCH 2/2] do not export disabled hostgroup --- www/class/config-generate-remote/Host.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/class/config-generate-remote/Host.php b/www/class/config-generate-remote/Host.php index eda729197c8..a1cdec444b6 100644 --- a/www/class/config-generate-remote/Host.php +++ b/www/class/config-generate-remote/Host.php @@ -49,6 +49,8 @@ private function getHostGroups(array &$host) $this->stmtHg = $this->backendInstance->db->prepare("SELECT hostgroup_hg_id FROM hostgroup_relation + INNER JOIN hostgroup ON hg_id = hostgroup_hg_id + AND hg_activate = '1' WHERE host_host_id = :host_id "); }