Private GIT

Skip to content
Snippets Groups Projects
Commit 1596655e authored by Kevin Duret's avatar Kevin Duret
Browse files

fix clapi export filter

parent 88e3f7cf
Branches
Tags
No related merge requests found
...@@ -766,7 +766,17 @@ class CentreonAPI ...@@ -766,7 +766,17 @@ class CentreonAPI
return 0; return 0;
} }
$this->objectTable[$action]->export($filter_id, $filter_name); $filters = array();
if (!is_null($filter_id) && $filter_id !== 0) {
$primaryKey = $this->objectTable[$action]->getObject()->getPrimaryKey();
$filters[$primaryKey] = $filter_id;
}
if (!is_null($filter_name)) {
$labelField = $this->objectTable[$action]->getObject()->getUniqueLabelField();
$filters[$labelField] = $filter_name;
}
$this->objectTable[$action]->export($filters);
$exported->ariane_pop(); $exported->ariane_pop();
} }
......
...@@ -129,6 +129,11 @@ abstract class CentreonObject ...@@ -129,6 +129,11 @@ abstract class CentreonObject
$this->api = CentreonAPI::getInstance(); $this->api = CentreonAPI::getInstance();
} }
public function getObject()
{
return $this->object;
}
/** /**
* Get Centreon Version * Get Centreon Version
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment