From 24e4befdac5187fe0ac832a3d0f339251dbbee42 Mon Sep 17 00:00:00 2001 From: Guillaume28 <gbaldo@centreon.com> Date: Mon, 5 Mar 2018 15:13:02 +0100 Subject: [PATCH] fix(Engine): cfg export with filter --- www/class/centreon-clapi/centreonEngineCfg.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/www/class/centreon-clapi/centreonEngineCfg.class.php b/www/class/centreon-clapi/centreonEngineCfg.class.php index ed746ad7e8..3254f59ead 100644 --- a/www/class/centreon-clapi/centreonEngineCfg.class.php +++ b/www/class/centreon-clapi/centreonEngineCfg.class.php @@ -284,8 +284,14 @@ class CentreonEngineCfg extends CentreonObject * * @return void */ - public function export($filters = null) + public function export($filter_id = null, $filter_name = null) { + $filters = null; + if (!is_null($filter_id)) { + $filters = array( + $this->object->getPrimaryKey() => $filter_id + ); + } $elements = $this->object->getList("*", -1, 0, null, null, $filters, "AND"); $tpObj = new \Centreon_Object_Timeperiod($this->dependencyInjector); foreach ($elements as $element) { -- GitLab