summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_wan.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-08-14 16:06:48 +0000
committerErmal Luçi <eri@pfsense.org>2008-08-14 16:06:48 +0000
commit67473d80ef16ae9010136686bdf447bae599af8c (patch)
treec5d35c633f06f61bf15f00087d858076a50438c7 /usr/local/www/interfaces_wan.php
parent7a6148e4ef515088583b4c36cad6aafd814a9bbb (diff)
downloadpfsense-67473d80ef16ae9010136686bdf447bae599af8c.zip
pfsense-67473d80ef16ae9010136686bdf447bae599af8c.tar.gz
* Move the interface detection of which interface is configured to the top so the pppoe reset function work correctly.
* Check is the array isset before referenceing it.
Diffstat (limited to 'usr/local/www/interfaces_wan.php')
-rwxr-xr-xusr/local/www/interfaces_wan.php21
1 files changed, 11 insertions, 10 deletions
diff --git a/usr/local/www/interfaces_wan.php b/usr/local/www/interfaces_wan.php
index 59c73ba..af96665 100755
--- a/usr/local/www/interfaces_wan.php
+++ b/usr/local/www/interfaces_wan.php
@@ -38,6 +38,15 @@
##|*MATCH=interfaces_wan.php*
##|-PRIV
+unset($if);
+if ($_GET['if'])
+ $if = $_GET['if'];
+else if ($_POST['if'])
+ $if = $_POST['if'];
+
+if (!$if)
+ $if = "wan";
+
define("CRON_MONTHLY_PATTERN", "0 0 1 * *");
define("CRON_WEEKLY_PATTERN", "0 0 * * 0");
@@ -80,15 +89,6 @@ function remove_bad_chars($string) {
require("guiconfig.inc");
-unset($if);
-if ($_GET['if'])
- $if = $_GET['if'];
-else if ($_POST['if'])
- $if = $_POST['if'];
-
-if (!$if)
- $if = "wan";
-
if (!is_array($config['gateways']['gateway_item']))
$config['gateways']['gateway_item'] = array();
$a_gateways = &$config['gateways']['gateway_item'];
@@ -363,7 +363,8 @@ n already exists.";
unset($wancfg['provider']);
unset($wancfg['ondemand']);
unset($wancfg['timeout']);
- unset($wancfg['pppoe']['pppoe-reset-type']);
+ if ($wancfg['pppoe']['pppoe-reset-type'])
+ unset($wancfg['pppoe']['pppoe-reset-type']);
unset($wancfg['local']);
unset($wancfg['subnet']);
unset($wancfg['remote']);
OpenPOWER on IntegriCloud