summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-10-11 16:39:53 +0000
committerErmal Luçi <eri@pfsense.org>2008-10-11 16:39:53 +0000
commit7994c3f859f6af2bcc80b6674fa3639414970b5b (patch)
treee5a8fb06d56635f7b1060aff2323d2829dc05b47 /usr/local/www
parent1f6ec411eb16d942395fea2cc2d639fb8d7d0b3d (diff)
downloadpfsense-7994c3f859f6af2bcc80b6674fa3639414970b5b.zip
pfsense-7994c3f859f6af2bcc80b6674fa3639414970b5b.tar.gz
Fix applying interface settings and prevent it from being applied multiple times as in ocasions with browser glitches. Remove some only wan part code.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/interfaces.php21
1 files changed, 11 insertions, 10 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 71c1a23..e89b411 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -245,7 +245,11 @@ if (isset($wancfg['wireless'])) {
if ($_POST['apply']) {
- unlink_if_exists("{$g['tmp_path']}/config.cache");
+ unset($input_errors);
+ if (!file_exists($d_landirty_path))
+ $intput_errors[] = "You have already applied your settings!";
+ else {
+ unlink_if_exists("{$g['tmp_path']}/config.cache");
unlink_if_exists("{$d_landirty_path}");
ob_flush();
@@ -269,7 +273,9 @@ if ($_POST['apply']) {
/* set up static routes */
system_routing_configure();
-
+ }
+ header("Location: interfaces.php?if={$if}");
+ exit;
} else if ($_POST) {
unset($input_errors);
@@ -280,7 +286,7 @@ if ($_POST['apply']) {
if ($_POST['enable'] || $if == "wan" || $if = "lan") {
/* optional interface if list */
- $iflist = get_configured_interface_with_descr(true);
+ $iflist = get_configured_interface_with_descr();
/* description unique? */
foreach ($iflist as $ifent => $ifdescr) {
@@ -306,13 +312,8 @@ n already exists.";
/* input validation */
if ($_POST['type'] == "static") {
- if ($if == "wan") {
- $reqdfields = explode(" ", "ipaddr subnet gateway");
- $reqdfieldsn = explode(",", "IP address,Subnet bit count,Gateway");
- } else {
- $reqdfields = explode(" ", "ipaddr subnet");
- $reqdfieldsn = explode(",", "IP address,Subnet bit count");
- }
+ $reqdfields = explode(" ", "ipaddr subnet gateway");
+ $reqdfieldsn = explode(",", "IP address,Subnet bit count,Gateway");
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
} else if ($_POST['type'] == "PPPoE") {
if ($_POST['pppoe_dialondemand']) {
OpenPOWER on IntegriCloud