From 4e93fd0dd1c93b3a1441529d2153fd5e0764c259 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Sun, 8 Apr 2007 21:37:32 +0000 Subject: [PATCH] fixes git-svn-id: http://www.observium.org/svn/observer/trunk@76 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/pages/interfaces.php | 4 ++-- includes/functions.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/html/pages/interfaces.php b/html/pages/interfaces.php index 6c607c0d5..4ad8dd4a6 100644 --- a/html/pages/interfaces.php +++ b/html/pages/interfaces.php @@ -1,6 +1,6 @@ "); @@ -14,7 +14,7 @@ while($interface = mysql_fetch_array($query)) { if(is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } $speed = humanspeed($interface['ifSpeed']); - $if_link = generateiflink($interface); + $if_link = generateiflink($interface, makeshortif($interface['ifDescr'])); $dev_link = generatedevicelink($interface); $type = humanmedia($interface['ifType']); diff --git a/includes/functions.php b/includes/functions.php index edba6fb14..8d4e91231 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -343,6 +343,8 @@ function fixifName ($inf) { $inf = str_replace("dial", "Dial", $inf); $inf = str_replace("hp procurve switch software Loopback interface", "Loopback Interface", $inf); $inf = str_replace("control plane interface", "Control Plane", $inf); + $inf = preg_replace("", "Interface \\1", $inf); + $inf = preg_replace("/^([0-9]+)$/", "Interface \\1", $inf); return $inf; }