diff options
author | Erik Fonnesbeck <efonnes@gmail.com> | 2010-08-01 21:42:35 -0600 |
---|---|---|
committer | Erik Fonnesbeck <efonnes@gmail.com> | 2010-08-01 21:53:08 -0600 |
commit | 8b35aa779f17c034cb9a43fcbad8a2186f6966c9 (patch) | |
tree | 1795a6a2f00dd5beff6b6128c43a43465dc39247 | |
parent | 57c52d45073cfb4de8ef2946f52d9cbc4e073b38 (diff) | |
download | pfsense-8b35aa779f17c034cb9a43fcbad8a2186f6966c9.zip pfsense-8b35aa779f17c034cb9a43fcbad8a2186f6966c9.tar.gz |
Fix interface name display for various cases on NAT rule listings.
-rwxr-xr-x | usr/local/www/firewall_nat.php | 8 | ||||
-rwxr-xr-x | usr/local/www/firewall_nat_1to1.php | 6 | ||||
-rwxr-xr-x | usr/local/www/firewall_nat_out.php | 10 |
3 files changed, 9 insertions, 15 deletions
diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php index 4e30c56..02a2595 100755 --- a/usr/local/www/firewall_nat.php +++ b/usr/local/www/firewall_nat.php @@ -261,12 +261,10 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript <td class="listlr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';"> <?=$textss;?> <?php - if (!$natent['interface'] || ($natent['interface'] == "wan") && !isset($config['interfaces'][$natent['interface']]['descr'])) - echo "WAN"; - else if(strtolower($natent['interface']) == "lan" && !isset($config['interfaces'][$natent['interface']]['descr'])) - echo "LAN"; + if (!$natent['interface']) + echo htmlspecialchars(convert_friendly_interface_to_friendly_descr("wan")); else - echo strtoupper($config['interfaces'][$natent['interface']]['descr']); + echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface'])); ?> <?=$textse;?> </td> diff --git a/usr/local/www/firewall_nat_1to1.php b/usr/local/www/firewall_nat_1to1.php index 52a1268..15788da 100755 --- a/usr/local/www/firewall_nat_1to1.php +++ b/usr/local/www/firewall_nat_1to1.php @@ -117,10 +117,10 @@ include("head.inc"); <tr> <td class="listlr" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';"> <?php - if (!$natent['interface'] || ($natent['interface'] == "wan")) - echo "WAN"; + if (!$natent['interface']) + echo htmlspecialchars(convert_friendly_interface_to_friendly_descr("wan")); else - echo htmlspecialchars($config['interfaces'][$natent['interface']]['descr']); + echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface'])); ?> </td> <td class="listr" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';"> diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php index b0abc50..e216516 100755 --- a/usr/local/www/firewall_nat_out.php +++ b/usr/local/www/firewall_nat_out.php @@ -361,14 +361,10 @@ include("head.inc"); <td class="listt" align="center"></td> <td class="listlr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';"> <?php - if (!$natent['interface'] || ($natent['interface'] == "wan")) - echo "WAN"; - else if (!$natent['interface'] || ($natent['interface'] == "lan")) - echo "LAN"; - else if ($natent['interface'] == "openvpn") - echo "OpenVPN"; + if (!$natent['interface']) + echo htmlspecialchars(convert_friendly_interface_to_friendly_descr("wan")); else - echo htmlspecialchars($config['interfaces'][$natent['interface']]['descr']); + echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface'])); ?> </td> |