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

Commit

Permalink
Fix: Remove obsolete code in Criticality class (#11841)
Browse files Browse the repository at this point in the history
* remove obsolete function getHostTplCriticality in criticality class

* Update www/class/centreonCriticality.class.php

Co-authored-by: TamazC <103252125+TamazC@users.noreply.github.com>

Co-authored-by: TamazC <103252125+TamazC@users.noreply.github.com>
  • Loading branch information
emabassi-ext and TamazC authored Sep 22, 2022
1 parent aa047fa commit 1aee7fe
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions www/class/centreonCriticality.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,29 +358,4 @@ protected function getServiceCriticality($service_id)
}
return 0;
}

public function getHostTplCriticities($host_id, $cache)
{
global $pearDB;

if (!$host_id) {
return null;
}

$rq = "SELECT host_tpl_id " .
"FROM host_template_relation " .
"WHERE host_host_id = '".$host_id."' " .
"ORDER BY `order`";
$DBRESULT = $pearDB->query($rq);
while ($row = $DBRESULT->fetchRow()) {
if (isset($cache[$row['host_tpl_id']])) {
return $this->getData($cache[$row['host_tpl_id']], false);
} else {
if ($result_field = $this->getHostTplCriticities($row['host_tpl_id'], $cache)) {
return $result_field;
}
}
}
return null;
}
}

0 comments on commit 1aee7fe

Please sign in to comment.