Private GIT

Skip to content
Snippets Groups Projects
Commit 2b90c55f authored by cgagnaire's avatar cgagnaire Committed by Kev
Browse files

replacing contact_name by contact_alias (#5546)

This class works like centreonService.class.php, and we pass the alias (i.e. the login) when setting contacts to a service template.
parent 23e5d2ed
No related branches found
No related tags found
No related merge requests found
......@@ -738,7 +738,7 @@ class CentreonServiceTemplate extends CentreonObject
$relationTable = array();
foreach ($relations as $rel) {
if ($matches[2] == "contact") {
$tab = $obj->getIdByParameter("contact_name", array($rel));
$tab = $obj->getIdByParameter("contact_alias", array($rel));
} else {
$tab = $obj->getIdByParameter($obj->getUniqueLabelField(), array($rel));
}
......@@ -956,7 +956,7 @@ class CentreonServiceTemplate extends CentreonObject
$filters_contactRel['service_id'] = $filters['service_id'];
}
$elements = $contactRel->getMergedParameters(
array("contact_name", "contact_id"),
array("contact_alias", "contact_id"),
array('service_description'),
-1,
0,
......@@ -970,7 +970,7 @@ class CentreonServiceTemplate extends CentreonObject
echo $this->action . $this->delim
. "addcontact" . $this->delim
. $element['service_description'] . $this->delim
. $element['contact_name'] . "\n";
. $element['contact_alias'] . "\n";
}
// macros
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment