Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
replacing contact_name by contact_alias (#5546)
Browse files Browse the repository at this point in the history
This class works like centreonService.class.php, and we pass the alias (i.e. the login) when setting contacts to a service template.
  • Loading branch information
cgagnaire authored and kduret committed Aug 17, 2017
1 parent 23e5d2e commit 2b90c55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions www/class/centreon-clapi/centreonServiceTemplate.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ public function __call($name, $arg)
$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));
}
Expand Down Expand Up @@ -956,7 +956,7 @@ public function export($filters = null)
$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,
Expand All @@ -970,7 +970,7 @@ public function export($filters = null)
echo $this->action . $this->delim
. "addcontact" . $this->delim
. $element['service_description'] . $this->delim
. $element['contact_name'] . "\n";
. $element['contact_alias'] . "\n";
}

// macros
Expand Down

0 comments on commit 2b90c55

Please sign in to comment.