summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2008-11-11 22:43:09 +0000
committerSeth Mos <seth.mos@xs4all.nl>2008-11-11 22:43:09 +0000
commit3537ac27bb3a2e0161d318ce107f04205de620c7 (patch)
tree45f58cc450dc8c27cc0002dd0f8a370358e46546 /usr
parente4b6b97aa244ff4c3f4a651f12827ffe57754cd3 (diff)
downloadpfsense-3537ac27bb3a2e0161d318ce107f04205de620c7.zip
pfsense-3537ac27bb3a2e0161d318ce107f04205de620c7.tar.gz
Correctly load dns gatewa setting from config.
FIXME, somehow entry 3 is always missing. Settings the gateway on 3 sets it on 1 in the config.xml
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/system.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/usr/local/www/system.php b/usr/local/www/system.php
index ac8a592..f58e148 100755
--- a/usr/local/www/system.php
+++ b/usr/local/www/system.php
@@ -163,14 +163,17 @@ if ($_POST) {
$config['system']['dns1gwint'] = $pconfig['dns1gwint'];
else
unset($config['system']['dns1gwint']);
+
if($_POST['dns2gwint'])
$config['system']['dns2gwint'] = $pconfig['dns2gwint'];
else
unset($config['system']['dns2gwint']);
+
if($_POST['dns3gwint'])
$config['system']['dns1gwint'] = $pconfig['dns3gwint'];
else
unset($config['system']['dns3gwint']);
+
if($_POST['dns4gwint'])
$config['system']['dns4gwint'] = $pconfig['dns4gwint'];
else
@@ -259,24 +262,25 @@ include("head.inc");
<input name="dns<?php echo $dnscounter;?>" type="text" class="formfld unknown" id="dns<?php echo $dnscounter;?>" size="20" value="<?php echo $pconfig['dns'.$dnscounter];?>">
</td>
<td>
- <select name=<?=$fldname;?>>
+ <select name='<?=$fldname;?>'>
<?php
if ($multiwan) {
$interface = "none";
- if($pconfig['dns{$dnscounter}gwint'] == $interface) {
- $selected = "$selected";
+ $dnsgw = "dns{$dnscounter}gwint";
+ if($pconfig[$dnsgw] == $interface) {
+ $selected = "selected";
} else {
$selected = "";
}
- print "<option value='$interface' $selected >". ucwords($interface) ."</option>\n";
+ echo "<option value='$interface' $selected>". ucwords($interface) ."</option>\n";
foreach($interfaces as $interface) {
if(interface_has_gateway($interface)) {
- if($pconfig['dns{$dnscounter}gwint'] == $interface) {
- $selected = "$selected";
+ if($pconfig[$dnsgw] == $interface) {
+ $selected = "selected";
} else {
$selected = "";
}
- print "<option value='$interface' $selected >". ucwords($interface) ."</option>\n";
+ echo "<option value='$interface' $selected>". ucwords($interface) ."</option>\n";
}
}
}
OpenPOWER on IntegriCloud