Revert "Be correct on teh variable scope"

This reverts commit 106646b420.
This commit is contained in:
jim-p 2011-09-12 19:20:08 -04:00
parent 106646b420
commit b8c8820bd1

View File

@ -420,18 +420,18 @@
}
$type = $_POST['selectedtype'];
$wanif = ""; $ppid = "";
$wanif = "";
if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) {
foreach ($config['ppps']['ppp'] as $pppid => $ppp) {
if ($realif == $ppp['if']) {
$ifaces = explode(",", $ppp['ports']);
$wanif = $ifaces[0]; $ppid = $pppid;
$wanif = $ifaces[0];
}
}
}
if (!empty($wanif)) {
$config['interfaces']['wan']['if'] = $wanif;
unset($config['ppps']['ppp'][$ppid]);
unset($config['ppps']['ppp'][$pppid]);
}
if ($type == "pppoe" || $type == "pptp") {