summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorgnhb <gnoahb@gmail.com>2011-02-24 00:14:32 +0700
committergnhb <gnoahb@gmail.com>2011-02-24 00:14:32 +0700
commit0030036fe1da0c5b99f4ea3654be23b5c66e8e8d (patch)
tree7cc9ea0397530036d4fd20ad50d9916de7137c58 /usr
parentec465066251a9e27549cb05a9da5ee9d77ecde2b (diff)
downloadpfsense-0030036fe1da0c5b99f4ea3654be23b5c66e8e8d.zip
pfsense-0030036fe1da0c5b99f4ea3654be23b5c66e8e8d.tar.gz
Don't forget to clear username field so it doesn't show up on next edit.
And if for some reason user enters a username, store it for them.
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/services_dyndns_edit.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/local/www/services_dyndns_edit.php b/usr/local/www/services_dyndns_edit.php
index 5c3f5fd..f2a3072 100644
--- a/usr/local/www/services_dyndns_edit.php
+++ b/usr/local/www/services_dyndns_edit.php
@@ -77,8 +77,8 @@ if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
- if($pconfig['type'] == "freedns" || $pconfig['type'] == "namecheap")
- $_POST['username'] = "not_required";
+ if(($pconfig['type'] == "freedns" || $pconfig['type'] == "namecheap") && $_POST['username'] == "")
+ $_POST['username'] = "none";
/* input validation */
$reqdfields = array();
@@ -104,6 +104,9 @@ if ($_POST) {
$dyndns['enable'] = $_POST['enable'] ? false : true;
$dyndns['interface'] = $_POST['interface'];
$dyndns['descr'] = $_POST['descr'];
+
+ if($dyndns['username'] == "none")
+ $dyndns['username'] = "";
if (isset($id) && $a_dyndns[$id])
$a_dyndns[$id] = $dyndns;
OpenPOWER on IntegriCloud