diff options
-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> |