summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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