summaryrefslogtreecommitdiffstats
path: root/usr/local/www/wizard.php
diff options
context:
space:
mode:
authorgnhb <gnoahb@gmail.com>2010-09-20 21:57:13 +0700
committergnhb <gnoahb@gmail.com>2010-09-20 21:57:13 +0700
commit389c778ec29d929a17843139f8cddf337b8fa9ad (patch)
tree4117a6f03265bc795d52a067d252425b054dac94 /usr/local/www/wizard.php
parent8ad39798ef9532f2793f9567db87423fc8f641f8 (diff)
downloadpfsense-389c778ec29d929a17843139f8cddf337b8fa9ad.zip
pfsense-389c778ec29d929a17843139f8cddf337b8fa9ad.tar.gz
Update wizard files for setup wizard to write proper config for current ppp architecture.
I also allowed selection of physical interface from the wizard screen. This is crucial because if the user has the WAN set to anything other than the same phyical interface used by pppoe/pptp, the old wizard has no way of knowing what physical port to use, and the wizard can generate a bad config. Feel free to expand the list of available interfaces in the dropdown for interface selection.
Diffstat (limited to 'usr/local/www/wizard.php')
-rwxr-xr-xusr/local/www/wizard.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php
index d255725..3ccf662 100755
--- a/usr/local/www/wizard.php
+++ b/usr/local/www/wizard.php
@@ -145,7 +145,7 @@ function update_config_field($field, $updatetext, $unset, $arraynum, $field_type
if($field_type == "interfaces_selection") {
$var = "\$config{$field_conv}";
$text = "if (isset({$var})) unset({$var});";
- $text = "\$config" . $field_conv . " = \"" . $updatetext . "\";";
+ $text .= "\$config" . $field_conv . " = \"" . $updatetext . "\";";
eval($text);
return;
}
@@ -430,6 +430,7 @@ function showchange() {
}
break;
case "interfaces_selection":
+ case "interface_select":
$size = "";
$multiple = "";
$name = strtolower($name);
@@ -448,8 +449,16 @@ function showchange() {
if($field['add_to_interfaces_selection'] == $value) $SELECTED = " SELECTED";
echo "<option value='" . $field['add_to_interfaces_selection'] . "'" . $SELECTED . ">" . $field['add_to_interfaces_selection'] . "</option>\n";
}
- $interfaces = get_configured_interface_with_descr();
+ if($field['type'] == "interface_select")
+ $interfaces = get_interface_list();
+ else
+ $interfaces = get_configured_interface_with_descr();
foreach ($interfaces as $ifname => $iface) {
+ if (is_array($iface)) {
+ if ($iface['mac'])
+ $iface = $ifname. " ({$iface['mac']})";
+ } else
+ $iface = $ifname;
$SELECTED = "";
if ($value == $ifname) $SELECTED = " SELECTED";
$to_echo = "<option value='" . $ifname . "'" . $SELECTED . ">" . $iface . "</option>\n";
OpenPOWER on IntegriCloud