From 4fab952696af1b5b7a9147948e117a573f0415df Mon Sep 17 00:00:00 2001 From: Paul Gear Date: Wed, 1 Jul 2015 08:08:31 +1000 Subject: [PATCH] Check for custom & MIB graphs before looking for a file --- html/includes/graphs/graph.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/html/includes/graphs/graph.inc.php b/html/includes/graphs/graph.inc.php index d7ed4cbc8..3e30d4b8e 100644 --- a/html/includes/graphs/graph.inc.php +++ b/html/includes/graphs/graph.inc.php @@ -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");