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

Commit

Permalink
applying suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hyahiaoui-ext committed Sep 9, 2022
1 parent c048bf1 commit 07c2d59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions www/class/centreonMeta.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@ public function insertVirtualService($metaId, $metaName)
if ($res->rowCount()) {
$row = $res->fetchRow();
$serviceId = $row['service_id'];
$query = 'UPDATE service SET display_name = :display_name WHERE service_id = :service_id';
$statement = $this->db->prepare($query);
if ($row['display_name'] !== $metaName) {
$query = 'UPDATE service SET display_name = :display_name WHERE service_id = :service_id';
$statement = $this->db->prepare($query);
$statement->bindValue(':display_name', $metaName, \PDO::PARAM_STR);
$statement->bindValue(':service_id', (int) $serviceId, \PDO::PARAM_INT);
$statement->execute();
Expand Down

0 comments on commit 07c2d59

Please sign in to comment.