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

fix(details): remove dead code #11672

Merged
merged 1 commit into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions www/include/monitoring/objectDetails/hostDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -725,40 +725,6 @@
$tpl->assign("h_ext_icon_image_alt", getMyHostExtendedInfoField($hostDB["host_id"], "ehi_icon_image_alt"));
}

/*
* Dynamics tools
*/
$tools = array();
$DBRESULT = $pearDB->query("SELECT * FROM modules_informations");
while ($module = $DBRESULT->fetchrow()) {
if (
isset($module['host_tools']) && $module['host_tools'] == 1
&& file_exists('modules/' . $module['name'] . '/host_tools.php')
) {
include('modules/' . $module['name'] . '/host_tools.php');
}
}
$DBRESULT->closeCursor();

foreach ($tools as $key => $tab) {
$tools[$key]['url'] = str_replace("@host_id@", $host_id, $tools[$key]['url']);
$tools[$key]['url'] = str_replace("@host_name@", $host_name, $tools[$key]['url']);
$tools[$key]['url'] = str_replace(
"@current_state@",
$host_status[$host_name]["current_state"],
$tools[$key]['url']
);
$tools[$key]['url'] = str_replace(
"@plugin_output@",
$host_status[$host_name]["plugin_output"],
$tools[$key]['url']
);
}

if (count($tools) > 0) {
$tpl->assign("tools", $tools);
}

// Check if central or remote server
$DBRESULT = $pearDB->query("SELECT `value` FROM `informations` WHERE `key` = 'isRemote'");
$result = $DBRESULT->fetchRow();
Expand Down
29 changes: 0 additions & 29 deletions www/include/monitoring/objectDetails/serviceDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -879,35 +879,6 @@
$tpl->assign("index_data", $index_data);
$tpl->assign("options2", CentreonUtils::escapeSecure($optionsURL2));

/*
* Dynamics tools
*/
$tools = array();
$DBRESULT = $pearDB->query("SELECT * FROM modules_informations");
while ($module = $DBRESULT->fetchrow()) {
if (
isset($module['svc_tools'])
&& $module['svc_tools'] == 1
&& file_exists('modules/' . $module['name'] . '/svc_tools.php')
) {
include('modules/' . $module['name'] . '/svc_tools.php');
}
}
$DBRESULT->closeCursor();

foreach ($tools as $key => $tab) {
$tools[$key]['url'] = str_replace("@host_id@", $host_id, $tools[$key]['url']);
$tools[$key]['url'] = str_replace("@host_name@", $host_name, $tools[$key]['url']);
$tools[$key]['url'] = str_replace("@svc_description@", $svc_description, $tools[$key]['url']);
$tools[$key]['url'] = str_replace("@svc_id@", $service_id, $tools[$key]['url']);
$tools[$key]['url'] = str_replace("@current_state@", $service_status["current_state"], $tools[$key]['url']);
$tools[$key]['url'] = str_replace("@plugin_output@", $service_status["plugin_output"], $tools[$key]['url']);
}

if (count($tools) > 0) {
$tpl->assign("tools", CentreonUtils::escapeSecure($tools));
}

/**
* Build the service detail URI that will be used in the
* deprecated banner
Expand Down