From 3358af267bc85ce3fe56fd2d090513be9c9e4a0a Mon Sep 17 00:00:00 2001 From: Guillaume28 <gbaldo@centreon.com> Date: Mon, 5 Mar 2018 15:26:40 +0100 Subject: [PATCH] fix(brokercfg): export with filter --- www/class/centreon-clapi/centreonCentbrokerCfg.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/www/class/centreon-clapi/centreonCentbrokerCfg.class.php b/www/class/centreon-clapi/centreonCentbrokerCfg.class.php index d88a8580d9..8a9f332a9b 100644 --- a/www/class/centreon-clapi/centreonCentbrokerCfg.class.php +++ b/www/class/centreon-clapi/centreonCentbrokerCfg.class.php @@ -693,8 +693,14 @@ class CentreonCentbrokerCfg 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"); foreach ($elements as $element) { -- GitLab