Private GIT

Skip to content
Snippets Groups Projects
Unverified Commit e01a7033 authored by David Boucher's avatar David Boucher Committed by GitHub
Browse files

fix(centAcl.php): Dead code removed (#6262)

* fix(centAcl.php): Dead code removed

The SQL query is simplified a little and all a string affectation
is removed, because done for nothing...
$hostNameCache is no more used.
parent 9776db4a
No related branches found
No related tags found
No related merge requests found
......@@ -225,8 +225,7 @@ try {
*/
$tabGroups = array();
$groupStr = "";
$query = "SELECT DISTINCT acl_groups.acl_group_id, acl_resources.acl_res_id " .
$query = "SELECT DISTINCT acl_groups.acl_group_id " .
"FROM acl_res_group_relations, `acl_groups`, `acl_resources` " .
"WHERE acl_groups.acl_group_id = acl_res_group_relations.acl_group_id " .
"AND acl_res_group_relations.acl_res_id = acl_resources.acl_res_id " .
......@@ -236,11 +235,7 @@ try {
$DBRESULT1 = $pearDB->query($query);
while ($result = $DBRESULT1->fetchRow()) {
$tabGroups[$result["acl_group_id"]] = 1;
if ($groupStr != '') {
$groupStr .= ",";
}
$groupStr = $result["acl_group_id"];
$tabGroups[$result['acl_group_id']] = 1;
}
$DBRESULT1->free();
unset($result);
......@@ -263,11 +258,9 @@ try {
$res->free();
$hostCache = array();
$hostNameCache = array();
$DBRESULT = $pearDB->query("SELECT host_id, host_name FROM host WHERE host_register = '1'");
while ($h = $DBRESULT->fetchRow()) {
$hostCache[$h["host_id"]] = $h["host_name"];
$hostNameCache[$h["host_name"]] = $h["host_id"];
}
$DBRESULT->free();
unset($h);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment