Private GIT

Skip to content
Snippets Groups Projects
Commit 91e4fa72 authored by loiclau's avatar loiclau Committed by Guillaume28
Browse files

fix(clapi): Fix importation of an existing broker configuration option (#5640)

* fix(clapi): Fix importation of an existing broker configuration option

* style(clapi) space and string
parent 2747e88c
No related branches found
No related tags found
No related merge requests found
......@@ -398,6 +398,21 @@ class CentreonCentbrokerCfg extends CentreonObject
$defaultValues[$field['fieldname']] = $field['value'];
}
$sql = "SELECT config_value " .
"FROM cfg_centreonbroker_info " .
"WHERE config_id = ? " .
"AND config_key = 'name' " .
"AND config_group = ? ";
$res = $this->db->query($sql, array($configId, $tagName));
while ($list = $res->fetch()) {
$listName[] = $list['config_value'];
}
if (in_array($args[1], $listName)) {
throw new CentreonClapiException(self::OBJECTALREADYEXISTS);
}
$blockId = $this->getBlockId($tagName, $args[2]);
$sql = "SELECT MAX(config_group_id) as max_id "
. "FROM cfg_centreonbroker_info "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment