summaryrefslogtreecommitdiffstats
path: root/usr/local/www/widgets/widgets
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-07-18 10:33:45 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-07-18 10:33:45 -0300
commitd806061cb4e5fd8f1b0f4d72019f7137d935e61d (patch)
tree6c1e21caca61ef82c968d7f9fd225a044c166074 /usr/local/www/widgets/widgets
parentf4b759123931a4891e4557d44d74e0bb0cb5bfaa (diff)
parent061ac3f364c342a433c0adf44b6dd77e0ccec8a9 (diff)
downloadpfsense-d806061cb4e5fd8f1b0f4d72019f7137d935e61d.zip
pfsense-d806061cb4e5fd8f1b0f4d72019f7137d935e61d.tar.gz
Merge pull request #1232 from N0YB/Widget_Gateways
Diffstat (limited to 'usr/local/www/widgets/widgets')
-rw-r--r--usr/local/www/widgets/widgets/gateways.widget.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr/local/www/widgets/widgets/gateways.widget.php b/usr/local/www/widgets/widgets/gateways.widget.php
index 50011e5..24b8afd 100644
--- a/usr/local/www/widgets/widgets/gateways.widget.php
+++ b/usr/local/www/widgets/widgets/gateways.widget.php
@@ -71,14 +71,17 @@ $counter = 1;
<td class="vncellt ellipsis" width="100%">
<div id="gateway<?php echo $counter; ?>" style="display:inline">
<?php
+ $if_gw = '';
if (is_ipaddr($gateway['gateway']))
- echo htmlspecialchars($gateway['gateway']);
+ $if_gw = htmlspecialchars($gateway['gateway']);
else {
if($gateway['ipprotocol'] == "inet")
- echo htmlspecialchars(get_interface_gateway($gateway['friendlyiface']));
+ $if_gw = htmlspecialchars(get_interface_gateway($gateway['friendlyiface']));
if($gateway['ipprotocol'] == "inet6")
- echo htmlspecialchars(get_interface_gateway_v6($gateway['friendlyiface']));
+ $if_gw = htmlspecialchars(get_interface_gateway_v6($gateway['friendlyiface']));
}
+ echo ($if_gw == '' ? '~' : $if_gw);
+ unset ($if_gw);
$counter++;
?>
</div>
OpenPOWER on IntegriCloud