diff --git a/html/includes/graphs/device/bits.inc.php b/html/includes/graphs/device/bits.inc.php
index 023851e5db..019a9333bb 100644
--- a/html/includes/graphs/device/bits.inc.php
+++ b/html/includes/graphs/device/bits.inc.php
@@ -4,14 +4,14 @@
$device = device_by_id_cache($id);
-foreach (dbFetchRows("SELECT * FROM `ports` WHERE `device_id` = ?", array($id)) as $int)
+foreach (dbFetchRows("SELECT * FROM `ports` WHERE `device_id` = ?", array($id)) as $port)
{
$ignore = 0;
if (is_array($config['device_traffic_iftype']))
{
foreach ($config['device_traffic_iftype'] as $iftype)
{
- if (preg_match($iftype ."i", $int['ifType']))
+ if (preg_match($iftype ."i", $port['ifType']))
{
$ignore = 1;
}
@@ -21,14 +21,14 @@ foreach (dbFetchRows("SELECT * FROM `ports` WHERE `device_id` = ?", array($id))
{
foreach ($config['device_traffic_descr'] as $ifdescr)
{
- if (preg_match($ifdescr."i", $int['ifDescr']) || preg_match($ifdescr."i", $int['ifName']) || preg_match($ifdescr."i", $int['portName']))
+ if (preg_match($ifdescr."i", $port['ifDescr']) || preg_match($ifdescr."i", $port['ifName']) || preg_match($ifdescr."i", $port['portName']))
{
$ignore = 1;
}
}
}
- $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/port-" . safename($int['ifIndex'] . ".rrd");
+ $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd");
if (is_file($rrd_filename) && $ignore != 1)
{
$rrd_filenames[] = $rrd_filename;
diff --git a/html/pages/device/ports.inc.php b/html/pages/device/ports.inc.php
index 5e15f00f8e..e9eb690bf6 100644
--- a/html/pages/device/ports.inc.php
+++ b/html/pages/device/ports.inc.php
@@ -1,5 +1,10 @@
");
+print_r($_GET);
+print_r($vars);
+echo("");
+
if ($_GET['optc'] == 'graphs')
{
if ($_GET['optd']) { $graph_type = "port_" . $_GET['optd']; } else { $graph_type = "port_bits"; }
diff --git a/includes/discovery/ports-stack.inc.php b/includes/discovery/ports-stack.inc.php
index 9d239f9b84..1708c949a5 100644
--- a/includes/discovery/ports-stack.inc.php
+++ b/includes/discovery/ports-stack.inc.php
@@ -35,6 +35,16 @@ foreach($stack_poll_array as $interface_id_high => $entry_high)
}
}
+foreach ($stack_db_array AS $interface_id_high => $array)
+{
+ foreach ($array AS $interface_id_low => $blah)
+ {
+ echo($device['device_id']." ".$interface_id_low." ".$interface_id_high. "\n");
+ dbDelete('ports_stack', "`device_id` = ? AND interface_id_high = ? AND interface_id_low = ?", array($device['device_id'], $interface_id_high, $interface_id_low));
+ echo("-");
+ }
+}
+
echo("\n");
?>