diff --git a/www/class/centreon-clapi/centreonAPI.class.php b/www/class/centreon-clapi/centreonAPI.class.php index a1ee35e5baf..d6c6bc34138 100644 --- a/www/class/centreon-clapi/centreonAPI.class.php +++ b/www/class/centreon-clapi/centreonAPI.class.php @@ -689,7 +689,7 @@ public function import($filename) while ($string = fgets($handle)) { $i++; $tab = preg_split('/;/', $string); - if (strlen(trim($string)) != 0) { + if (strlen(trim($string)) != 0 && !preg_match('/^\{OBJECT_TYPE\}/', $string)) { $this->object = trim($tab[0]); $this->action = trim($tab[1]); $this->variables = trim(substr($string, strlen($tab[0] . ";" . $tab[1] . ";"))); @@ -819,6 +819,7 @@ public function export() exit($this->return_code); } else { // header + echo "{OBJECT_TYPE}{$this->delim}{COMMAND}{$this->delim}{PARAMETERS}\n"; if (count($this->aExport) > 0) { foreach ($this->aExport as $oObjet) { if (method_exists($this->objectTable[$oObjet], 'export')) {