diff --git a/usr/local/www/status_interfaces.php b/usr/local/www/status_interfaces.php index 4b9e794535..3eeef53c47 100755 --- a/usr/local/www/status_interfaces.php +++ b/usr/local/www/status_interfaces.php @@ -30,7 +30,8 @@ */ $pgtitle = array("Status", "Interfaces"); -require("guiconfig.inc"); + +require_once("guiconfig.inc"); $wancfg = &$config['interfaces']['wan']; @@ -97,7 +98,7 @@ function get_interface_info($ifdescr) { /* DHCP? -> see if dhclient is up */ if (($ifdescr == "wan") && ($config['interfaces']['wan']['ipaddr'] == "dhcp")) { /* see if dhclient is up */ - if ($ifinfo['status'] == "up" && is_process_running("dhclient") == true) + if (is_process_running("dhclient") == true) $ifinfo['dhcplink'] = "up"; else $ifinfo['dhcplink'] = "down"; @@ -222,18 +223,18 @@ function get_interface_info($ifdescr) { 'WAN', 'lan' => 'LAN'); - for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++) { - $ifdescrs['opt' . $j] = $config['interfaces']['opt' . $j]['descr']; - } + for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++) { + $ifdescrs['opt' . $j] = $config['interfaces']['opt' . $j]['descr']; + } - foreach ($ifdescrs as $ifdescr => $ifname): - $ifinfo = get_interface_info($ifdescr); - ?> + foreach ($ifdescrs as $ifdescr => $ifname): + $ifinfo = get_interface_info($ifdescr); + ?> - - - + + +