From 04138b75125954fb741559516ebaefa7f5e97fa6 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Wed, 1 Jun 2011 09:54:05 +0000 Subject: [PATCH] debug git-svn-id: http://www.observium.org/svn/observer/trunk@2379 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/graphs/macaccounting/auth.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/html/includes/graphs/macaccounting/auth.inc.php b/html/includes/graphs/macaccounting/auth.inc.php index d420c44f7e..5869f3858b 100644 --- a/html/includes/graphs/macaccounting/auth.inc.php +++ b/html/includes/graphs/macaccounting/auth.inc.php @@ -5,12 +5,19 @@ if (is_numeric($id)) $acc = dbFetchRow("SELECT * FROM `mac_accounting` AS M, `ports` AS I, `devices` AS D WHERE M.ma_id = ? AND I.interface_id = M.interface_id AND I.device_id = D.device_id", array($id)); - print_r($acc); + if($debug) { + echo("
");
+    print_r($acc);
+    echo("
"); + } if (is_array($acc)) { + if($auth || port_permitted($acc['interface_id'])) { + if($debug) { echo($config['rrd_dir'] . "/" . $acc['hostname'] . "/" . safename("cip-" . $acc['ifIndex'] . "-" . $acc['mac'] . ".rrd"); } + if(is_file($config['rrd_dir'] . "/" . $acc['hostname'] . "/" . safename("cip-" . $acc['ifIndex'] . "-" . $acc['mac'] . ".rrd"))) { $rrd_filename = $config['rrd_dir'] . "/" . $acc['hostname'] . "/" . safename("cip-" . $acc['ifIndex'] . "-" . $acc['mac'] . ".rrd");