diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-08-14 16:06:48 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-08-14 16:06:48 +0000 |
commit | 67473d80ef16ae9010136686bdf447bae599af8c (patch) | |
tree | c5d35c633f06f61bf15f00087d858076a50438c7 /usr | |
parent | 7a6148e4ef515088583b4c36cad6aafd814a9bbb (diff) | |
download | pfsense-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')
-rwxr-xr-x | usr/local/www/interfaces.php | 21 | ||||
-rwxr-xr-x | usr/local/www/interfaces_wan.php | 21 |
2 files changed, 22 insertions, 20 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 59c73ba..af96665 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.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']); 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']); |