mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
Fix Scrutinizer issues
This commit is contained in:
@@ -20,7 +20,8 @@ foreach (glob($prefix."*.rrd") as $filename) {
|
||||
$instance = substr($globpart, 0, -4); // take off ".rrd"
|
||||
|
||||
$ds = array();
|
||||
$mibvar = end(explode("-", $subtype));
|
||||
$mibparts = explode("-", $subtype);
|
||||
$mibvar = end($mibparts);
|
||||
$ds['ds'] = name_shorten($mibvar);
|
||||
$ds['descr'] = "$mibvar-$instance";
|
||||
$ds['filename'] = $filename;
|
||||
@@ -33,5 +34,3 @@ $nototal = 0;
|
||||
$simple_rrd = true;
|
||||
|
||||
include("includes/graphs/generic_multi_line.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -41,10 +41,10 @@ $subtype = $graphtype['subtype'];
|
||||
$auth = is_client_authorized($_SERVER['REMOTE_ADDR']);
|
||||
include($config['install_dir'] . "/html/includes/graphs/$type/auth.inc.php");
|
||||
|
||||
if ($auth && is_file($config['install_dir'] . "/html/includes/graphs/$type/$subtype.inc.php")) {
|
||||
if ($auth === true && is_file($config['install_dir'] . "/html/includes/graphs/$type/$subtype.inc.php")) {
|
||||
include($config['install_dir'] . "/html/includes/graphs/$type/$subtype.inc.php");
|
||||
}
|
||||
elseif ($auth && is_mib_graph($type, $subtype)) {
|
||||
elseif ($auth === true && is_mib_graph($type, $subtype)) {
|
||||
include($config['install_dir'] . "/html/includes/graphs/$type/mib.inc.php");
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user