summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_gateways.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-01-29 01:39:25 +0000
committerErmal Luçi <eri@pfsense.org>2010-01-29 01:44:40 +0000
commit883c53c92f1b99b3aab1d94f05168969423255b3 (patch)
tree8a5858aed01227908218d4eaa4b3bdb6a7fe5970 /usr/local/www/system_gateways.php
parent3ff90af790525a8b852562880317f88eaef5bffd (diff)
downloadpfsense-883c53c92f1b99b3aab1d94f05168969423255b3.zip
pfsense-883c53c92f1b99b3aab1d94f05168969423255b3.tar.gz
Ticket #303. Fix very many bugs in this code. From strings that were not quoted propperly to completely broken code paths.
Diffstat (limited to 'usr/local/www/system_gateways.php')
-rwxr-xr-xusr/local/www/system_gateways.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr/local/www/system_gateways.php b/usr/local/www/system_gateways.php
index f80ce26..ef70f96 100755
--- a/usr/local/www/system_gateways.php
+++ b/usr/local/www/system_gateways.php
@@ -51,7 +51,6 @@ foreach($a_gateways as $gw) {
}
$a_gateways = $a_gateways_arr;
-
if (!is_array($config['gateways']['gateway_item']))
$config['gateways']['gateway_item'] = array();
@@ -82,10 +81,9 @@ if ($_GET['act'] == "del") {
if ($a_gateways[$_GET['id']]) {
/* remove the real entry */
$realid = $a_gateways[$_GET['id']]['attribute'];
- $a_gateways = &$config['gateways']['gateway_item'];
$changedesc .= "removed gateway {$realid}";
- unset($a_gateways[$realid]);
+ unset($a_gateway_item[$realid]);
write_config($changedesc);
mark_subsystem_dirty('staticroutes');
header("Location: system_gateways.php");
@@ -160,7 +158,7 @@ effect.");?><br>
if(isset($gateway['interfacegateway'])) {
echo strtoupper($gateway['interface']) . " ";
} else {
- if(is_numeric($gateway['attribute']) && ($a_gateway_item[$gateway['attribute']]['gateway'] == dynamic)) {
+ if(is_numeric($gateway['attribute']) && ($a_gateway_item[$gateway['attribute']]['gateway'] == "dynamic")) {
echo "dynamic";
} else {
echo $gateway['gateway'] . " ";
@@ -170,7 +168,7 @@ effect.");?><br>
</td>
<td class="listr" ondblclick="document.location='system_gateways_edit.php?id=<?=$i;?>';">
<?php
- if(is_numeric($gateway['attribute']) && ($a_gateway_item[$gateway['attribute']]['gateway'] == dynamic) && ($a_gateway_item[$gateway['attribute']]['gateway'] == "")) {
+ if(is_numeric($gateway['attribute']) && ($a_gateway_item[$gateway['attribute']]['monitor'] == "dynamic")) {
echo "dynamic";
} else {
echo htmlspecialchars($gateway['monitor']) . " ";
OpenPOWER on IntegriCloud