Check for custom & MIB graphs before looking for a file

This commit is contained in:
Paul Gear
2015-07-01 08:08:31 +10:00
parent 45499e6aa9
commit 4fab952696

View File

@@ -43,12 +43,15 @@ if ($auth !== true && $auth != 1) {
require $config['install_dir']."/html/includes/graphs/$type/auth.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";
if ($auth === true && is_custom_graph($type, $subtype, $device)) {
include($config['install_dir'] . "/html/includes/graphs/custom.inc.php");
}
else if ($auth === true && is_mib_graph($type, $subtype)) {
include $config['install_dir']."/html/includes/graphs/$type/mib.inc.php";
}
elseif ($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";
}
else {
graph_error("$type*$subtype ");
// Graph Template Missing");