summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_captiveportal_mac_edit.php
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2010-08-06 17:04:32 -0400
committerChris Buechler <cmb@pfsense.org>2010-08-06 17:05:31 -0400
commit50718c4680fe37a77e3468cc6d02272f11cdd806 (patch)
tree61efbe18dcdc00cbe714bd4736732980c52749df /usr/local/www/services_captiveportal_mac_edit.php
parent2507f1c0d3d5fca2d4267770e0af0bb5a0a598b6 (diff)
downloadpfsense-50718c4680fe37a77e3468cc6d02272f11cdd806.zip
pfsense-50718c4680fe37a77e3468cc6d02272f11cdd806.tar.gz
Don't wipe out stored username on pass-through MAC entries when manually saving them.
Diffstat (limited to 'usr/local/www/services_captiveportal_mac_edit.php')
-rwxr-xr-xusr/local/www/services_captiveportal_mac_edit.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/local/www/services_captiveportal_mac_edit.php b/usr/local/www/services_captiveportal_mac_edit.php
index 4508a02..f0d92c3 100755
--- a/usr/local/www/services_captiveportal_mac_edit.php
+++ b/usr/local/www/services_captiveportal_mac_edit.php
@@ -73,6 +73,7 @@ if (isset($id) && $a_passthrumacs[$id]) {
$pconfig['bw_up'] = $a_passthrumacs[$id]['bw_up'];
$pconfig['bw_down'] = $a_passthrumacs[$id]['bw_down'];
$pconfig['descr'] = $a_passthrumacs[$id]['descr'];
+ $pconfig['username'] = $a_passthrumacs[$id]['username'];
}
if ($_POST) {
@@ -113,6 +114,8 @@ if ($_POST) {
$mac['bw_up'] = $_POST['bw_up'];
if ($_POST['bw_down'])
$mac['bw_down'] = $_POST['bw_down'];
+ if ($_POST['username'])
+ $mac['username'] = $_POST['username'];
$mac['descr'] = $_POST['descr'];
@@ -183,6 +186,9 @@ include("head.inc");
<?php if (isset($id) && $a_passthrumacs[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
+ <?php if (isset($pconfig['username']) && $pconfig['username']): ?>
+ <input name="username" type="hidden" value="<?=htmlspecialchars($pconfig['username']);?>">
+ <?php endif; ?>
</td>
</tr>
</table>
OpenPOWER on IntegriCloud