diff --git a/config.php.default b/config.php.default
index 76581ebfb0..c773cbc681 100755
--- a/config.php.default
+++ b/config.php.default
@@ -1,5 +1,8 @@
diff --git a/includes/functions.php b/includes/functions.php
index 661114ddc3..51665344e4 100755
--- a/includes/functions.php
+++ b/includes/functions.php
@@ -311,27 +311,33 @@ function geteventicon ($message)
if ($icon) { return $icon; } else { return false; }
}
-function generateiflink($interface, $text=0, $type = '')
+function generateiflink($interface, $text=0, $type = NULL)
{
global $twoday; global $now; global $config; global $day; global $month;
$interface = ifNameDescr($interface);
if (!$text) { $text = fixIfName($interface['label']); }
- if (isset($type)) { $interface['graph_type'] = $type; }
- if (!$interface['graph_type']) { $interface['graph_type'] = 'port_bits'; }
+ if (isset($type)) { $interface['graph_type'] = $type; } else { $interface['graph_type'] = 'port_bits'; }
$class = ifclass($interface['ifOperStatus'], $interface['ifAdminStatus']);
$graph_url = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&from=$day&to=$now&width=400&height=100&type=" . $interface['graph_type'];
$graph_url_month = $config['base_url'] . "/graph.php?port=" . $interface['interface_id'] . "&from=$month&to=$now&width=400&height=100&type=" . $interface['graph_type'];
$device_id = getifhost($interface['interface_id']);
- $link = "";
- if ($interface['ifAlias']) { $link .= "
" . htmlentities($interface['ifAlias']); }
- $link .= "' ";
- $link .= $config['overlib_defaults'].");\" onmouseout=\"return nd();\" >$text";
+ $url = $config['base_url']."/device/$device_id/interface/" . $interface['interface_id'] . "/";
+ $contents = "