diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-02-09 05:23:28 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-02-09 05:23:28 +0000 |
commit | e47499d578802a7d20fc07380aad9c0f74c779be (patch) | |
tree | c07acdee202c1cdef60232198f6101aaf45873e5 /usr | |
parent | dc22ae4d0f15af72d6b6623c45ca7450ec04236c (diff) | |
download | pfsense-e47499d578802a7d20fc07380aad9c0f74c779be.zip pfsense-e47499d578802a7d20fc07380aad9c0f74c779be.tar.gz |
Do not show LAN interface when it is not present.
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/services_wol.php | 22 | ||||
-rwxr-xr-x | usr/local/www/services_wol_edit.php | 6 |
2 files changed, 18 insertions, 10 deletions
diff --git a/usr/local/www/services_wol.php b/usr/local/www/services_wol.php index 51d8a8a..54a3cef 100755 --- a/usr/local/www/services_wol.php +++ b/usr/local/www/services_wol.php @@ -104,15 +104,19 @@ include("head.inc"); <tr> <td width="22%" valign="top" class="vncellreq">Interface</td> <td width="78%" class="vtable"> - <select name="interface" class="formselect"> - <?php $interfaces = array('lan' => 'LAN'); - for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) { - if (isset($config['interfaces']['opt' . $i]['enable']) && - !$config['interfaces']['opt' . $i]['bridge']) - $interfaces['opt' . $i] = $config['interfaces']['opt' . $i]['descr']; - } - foreach ($interfaces as $iface => $ifacename): ?> - <option value="<?=$iface;?>" <?php if ($iface == $if) echo "selected"; ?>> + <select name="interface" class="formselect"> + <?php + if($config['interfaces']['lan']) + $interfaces = array('wan' => 'WAN', 'lan' => 'LAN'); + else + $interfaces = array('wan' => 'WAN'); + for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) { + if (isset($config['interfaces']['opt' . $i]['enable']) && + !$config['interfaces']['opt' . $i]['bridge']) + $interfaces['opt' . $i] = $config['interfaces']['opt' . $i]['descr']; + } + foreach ($interfaces as $iface => $ifacename): ?> + <option value="<?=$iface;?>" <?php if ($iface == $if) echo "selected"; ?>> <?=htmlspecialchars($ifacename);?> </option> <?php endforeach; ?> diff --git a/usr/local/www/services_wol_edit.php b/usr/local/www/services_wol_edit.php index 1b5c9a6..c4b1646 100755 --- a/usr/local/www/services_wol_edit.php +++ b/usr/local/www/services_wol_edit.php @@ -103,7 +103,11 @@ include("head.inc"); <td width="22%" valign="top" class="vncellreq">Interface</td> <td width="78%" class="vtable"> <select name="interface" class="formfld"> - <?php $interfaces = array('lan' => 'LAN'); + <?php + if($config['interfaces']['lan']) + $interfaces = array('lan' => 'LAN'); + else + $interfaces = array('WAN' => 'WAN'); for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) { if (isset($config['interfaces']['opt' . $i]['enable']) && !$config['interfaces']['opt' . $i]['bridge']) |