summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr/local/www/wizards/setup_wizard.xml22
1 files changed, 14 insertions, 8 deletions
diff --git a/usr/local/www/wizards/setup_wizard.xml b/usr/local/www/wizards/setup_wizard.xml
index a3607e6..01d1e5c 100644
--- a/usr/local/www/wizards/setup_wizard.xml
+++ b/usr/local/www/wizards/setup_wizard.xml
@@ -419,17 +419,23 @@
die;
}
$type = $_POST['selectedtype'];
- if ($type == "pppoe" || $type == "pptp") {
- if (!is_array($config['ppps']['ppp']))
- $config['ppps']['ppp'] = array();
- if (count($config['ppps']['ppp'])) {
- foreach ($config['ppps']['ppp'] as $pppid => $ppp) {
- if ($ppp['ptpid'] == "0") {
- unset($config['ppps']['ppp'][$pppid]);
- // break;
+
+ if (!is_array($config['ppps']['ppp']))
+ $config['ppps']['ppp'] = array();
+ if (count($config['ppps']['ppp'])) {
+ foreach ($config['ppps']['ppp'] as $pppid => $ppp) {
+ if ($ppp['ptpid'] == "0") {
+ if ((substr($config['interfaces']['wan']['if'],0,5) == "pppoe") || (substr($config['interfaces']['wan']['if'],0,4) == "pptp")) {
+ $oldif = explode(",", $ppp['ports']);
+ $config['interfaces']['wan']['if'] = $oldif[0];
}
+ if ($type == "pppoe" || $type == "pptp")
+ unset($config['ppps']['ppp'][$pppid]);
}
}
+ }
+
+ if ($type == "pppoe" || $type == "pptp") {
if ($type == "pptp") {
$config['wizardtemp']['wan']['username'] = $config['wizardtemp']['wan']['pptpusername'];
$config['wizardtemp']['wan']['password'] = $config['wizardtemp']['wan']['pptppassword'];
OpenPOWER on IntegriCloud