From 3e321df2be59d2bb4c2ffd51e410fe120517e316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=C3=A7i?= Date: Sat, 21 Jun 2008 17:38:13 +0000 Subject: Continue interface improvements --- usr/local/www/includes/functions.inc.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'usr/local/www/includes') diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php index 38f4b14..5f3b1fa 100644 --- a/usr/local/www/includes/functions.inc.php +++ b/usr/local/www/includes/functions.inc.php @@ -154,10 +154,8 @@ function get_interfacestats(){ global $config; //build interface list for widget use - $i = 0; $ifdescrs = array('wan' => 'WAN', 'lan' => 'LAN'); - for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++) { - $ifdescrs['opt' . $j] = $config['interfaces']['opt' . $j]['descr']; - } + $ifdescrs = get_configured_interface_list_with_descr(); + $array_in_packets = array(); $array_out_packets = array(); $array_in_bytes = array(); @@ -201,10 +199,7 @@ function get_interfacestatus(){ global $config; //build interface list for widget use - $i = 0; $ifdescrs = array('wan' => 'WAN', 'lan' => 'LAN'); - for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++) { - $ifdescrs['opt' . $j] = $config['interfaces']['opt' . $j]['descr']; - } + $ifdescrs = get_configured_interface_with_descr(); foreach ($ifdescrs as $ifdescr => $ifname){ $ifinfo = get_interface_info($ifdescr); -- cgit v1.1