summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-08-01 21:42:35 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2010-08-01 21:53:08 -0600
commit8b35aa779f17c034cb9a43fcbad8a2186f6966c9 (patch)
tree1795a6a2f00dd5beff6b6128c43a43465dc39247
parent57c52d45073cfb4de8ef2946f52d9cbc4e073b38 (diff)
downloadpfsense-8b35aa779f17c034cb9a43fcbad8a2186f6966c9.zip
pfsense-8b35aa779f17c034cb9a43fcbad8a2186f6966c9.tar.gz
Fix interface name display for various cases on NAT rule listings.
-rwxr-xr-xusr/local/www/firewall_nat.php8
-rwxr-xr-xusr/local/www/firewall_nat_1to1.php6
-rwxr-xr-xusr/local/www/firewall_nat_out.php10
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']));
?>
&nbsp;
</td>
OpenPOWER on IntegriCloud