Fix Scrutinizer issues

This commit is contained in:
Paul Gear
2015-06-16 08:42:05 +10:00
parent 95e3d7000d
commit 0eb3e69167
5 changed files with 14 additions and 14 deletions
+2 -3
View File
@@ -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");
?>
+2 -2
View File
@@ -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 {