diff options
author | gnhb <gnoahb@gmail.com> | 2011-02-24 00:05:17 +0700 |
---|---|---|
committer | gnhb <gnoahb@gmail.com> | 2011-02-24 00:05:17 +0700 |
commit | d9cc4b24d09c04dc2a1974ab8da8e564f7462e36 (patch) | |
tree | 27bbad66a4552cd2e9d2852c0ea1be3e95926ff3 | |
parent | 1f9d17ef8d0577f8e56d6426975823d9bc68ead2 (diff) | |
download | pfsense-d9cc4b24d09c04dc2a1974ab8da8e564f7462e36.zip pfsense-d9cc4b24d09c04dc2a1974ab8da8e564f7462e36.tar.gz |
Try again, a little cleaner: Prevent GUI from giving error for freeDNS service since username and password
-rw-r--r-- | etc/inc/dyndns.class | 2 | ||||
-rw-r--r-- | usr/local/www/services_dyndns_edit.php | 13 |
2 files changed, 8 insertions, 7 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class index c46d1fb..dcde894 100644 --- a/etc/inc/dyndns.class +++ b/etc/inc/dyndns.class @@ -350,7 +350,7 @@ break; case 'freedns': $needIP = FALSE; - curl_setopt($ch, CURLOPT_URL, 'http://freedns.afraid.org/dynamic/update.php?' . $this->_dnsHost); + curl_setopt($ch, CURLOPT_URL, 'http://freedns.afraid.org/dynamic/update.php?' . $this->_dnsPass); $data = curl_exec($ch); if (@curl_error($ch)) log_error("Curl error occurred: " . curl_error($ch)); curl_close($ch); diff --git a/usr/local/www/services_dyndns_edit.php b/usr/local/www/services_dyndns_edit.php index 9ff0f22..5c3f5fd 100644 --- a/usr/local/www/services_dyndns_edit.php +++ b/usr/local/www/services_dyndns_edit.php @@ -76,16 +76,15 @@ if ($_POST) { unset($input_errors); $pconfig = $_POST; + + if($pconfig['type'] == "freedns" || $pconfig['type'] == "namecheap") + $_POST['username'] = "not_required"; /* input validation */ $reqdfields = array(); $reqdfieldsn = array(); - $reqdfields = array("host", "password", "type"); - $reqdfieldsn = array(gettext("Hostname"),gettext("Password"),gettext("Service type")); - if ($pconfig['type'] != "namecheap") { - $reqdfields[] = "username"; - $reqdfieldsn[] = gettext("Username"); - } + $reqdfields = array("host", "username", "password", "type"); + $reqdfieldsn = array(gettext("Hostname"),gettext("Username"),gettext("Password"),gettext("Service type")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); @@ -217,6 +216,8 @@ include("head.inc"); <td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td> <td width="78%" class="vtable"> <input name="password" type="password" class="formfld pwd" id="password" size="20" value="<?=htmlspecialchars($pconfig['password']);?>"> + <br/> + <?=gettext("FreeDNS (freedns.afraid.org): Enter your \"Authentication Token\" provided by FreeDNS.");?> </td> </tr> <tr> |