diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2016-03-21 16:49:36 -0400 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-03-21 16:49:59 -0400 |
commit | 9b48e538836a382edbe8fae081f1cd72bdaae047 (patch) | |
tree | 0fef4c7a3063183708f13bf0d1d0348dbb82a38e /src/usr/local/www/system_gateway_groups.php | |
parent | 3080d476e02c4b8a8d6705f16c5c97e2ae984568 (diff) | |
download | pfsense-9b48e538836a382edbe8fae081f1cd72bdaae047.zip pfsense-9b48e538836a382edbe8fae081f1cd72bdaae047.tar.gz |
Fixed #6017
Diffstat (limited to 'src/usr/local/www/system_gateway_groups.php')
-rw-r--r-- | src/usr/local/www/system_gateway_groups.php | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/usr/local/www/system_gateway_groups.php b/src/usr/local/www/system_gateway_groups.php index 4436a7d..672b2a0 100644 --- a/src/usr/local/www/system_gateway_groups.php +++ b/src/usr/local/www/system_gateway_groups.php @@ -121,6 +121,20 @@ if ($_GET['act'] == "del") { } } +function gateway_exists($gwname) { + $gateways = return_gateways_array(); + + if (is_array($gateways)) { + foreach ($gateways as $gw) { + if ($gw['name'] == $gwname) { + return(true); + } + } + } + + return(false); +} + $pgtitle = array(gettext("System"), gettext("Routing"), gettext("Gateway Groups")); $shortcut_section = "gateway-groups"; @@ -167,7 +181,9 @@ foreach ($a_gateway_groups as $gateway_group): <?php foreach ($gateway_group['item'] as $item) { $itemsplit = explode("|", $item); - print(htmlspecialchars(strtoupper($itemsplit[0])) . "<br />\n"); + if (gateway_exists($itemsplit[0])) { + print(htmlspecialchars(strtoupper($itemsplit[0])) . "<br />\n"); + } } ?> </td> @@ -175,7 +191,9 @@ foreach ($a_gateway_groups as $gateway_group): <?php foreach ($gateway_group['item'] as $item) { $itemsplit = explode("|", $item); - print("Tier ". htmlspecialchars($itemsplit[1]) . "<br />\n"); + if (gateway_exists($itemsplit[0])) { + print("Tier ". htmlspecialchars($itemsplit[1]) . "<br />\n"); + } } ?> </td> |