summaryrefslogtreecommitdiffstats
path: root/etc/inc/util.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r--etc/inc/util.inc15
1 files changed, 9 insertions, 6 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index d9da9d8..d14bd63 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -273,7 +273,7 @@ function is_valid_shaperbw($val) {
}
/* return the configured interfaces list. */
-function get_configured_interface_list($only_opt = false) {
+function get_configured_interface_list($only_opt = false, $withdisabled = false) {
global $config;
$iflist = array();
@@ -282,7 +282,8 @@ function get_configured_interface_list($only_opt = false) {
foreach($config['interfaces'] as $if => $ifdetail) {
if ($only_opt == true && ($if == "wan" || $if == "lan"))
continue;
- if ($if == "wan" || $if == "lan" || isset($ifdetail['enable']))
+ if ($if == "wan" || $if == "lan" || isset($ifdetail['enable']) ||
+ $withdisabled == true)
$iflist[$if] = $if;
}
@@ -291,7 +292,7 @@ function get_configured_interface_list($only_opt = false) {
}
/* return the configured interfaces list with their description. */
-function get_configured_interface_with_descr($only_opt = false) {
+function get_configured_interface_with_descr($only_opt = false, $withdisabled = false) {
global $config;
$iflist = array();
@@ -300,10 +301,12 @@ function get_configured_interface_with_descr($only_opt = false) {
foreach($config['interfaces'] as $if => $ifdetail) {
if ($only_opt == true && ($if == "wan" || $if == "lan"))
continue;
- if ($if == "wan" || $if == "lan" || isset($ifdetail['enable'])) {
+ if ($if == "wan" || $if == "lan" || isset($ifdetail['enable']) ||
+ $withdisabled == true) {
if($ifdetail['descr'] == "")
- $ifdetail['descr'] = $if;
- $iflist[$if] = $ifdetail['descr'];
+ $iflist[$if] = $if;
+ else
+ $iflist[$if] = $ifdetail['descr'];
}
}
OpenPOWER on IntegriCloud