summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2016-02-02 14:48:37 -0500
committerjim-p <jimp@pfsense.org>2016-02-02 14:48:37 -0500
commit55fa9d51e6ab20289c8656720db5d967a582b26d (patch)
treef997f6b7f20ec1e7c3568afc1a2483c8b5e535a3
parentda34e36263b219a8fd712282e16bf1d5950938ac (diff)
downloadpfsense-55fa9d51e6ab20289c8656720db5d967a582b26d.zip
pfsense-55fa9d51e6ab20289c8656720db5d967a582b26d.tar.gz
Fix up DynDNS widget to follow recent changes in DynDNS for Namecheap
-rw-r--r--src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php b/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php
index a875526..fe501a5 100644
--- a/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php
+++ b/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php
@@ -77,7 +77,13 @@ if ($_REQUEST['getdyndnsstatus']) {
echo "|";
}
- $filename = "{$g['conf_path']}/dyndns_{$dyndns['interface']}{$dyndns['type']}" . escapeshellarg($dyndns['host']) . "{$dyndns['id']}.cache";
+ if ($dyndns['type'] == "namecheap") {
+ $hostname = $dyndns['host'] . "." . $dyndns['domainname'];
+ } else {
+ $hostname = $dyndns['host'];
+ }
+
+ $filename = "{$g['conf_path']}/dyndns_{$dyndns['interface']}{$dyndns['type']}" . escapeshellarg($hostname) . "{$dyndns['id']}.cache";
if (file_exists($filename)) {
$ipaddr = dyndnsCheckIP($dyndns['interface']);
$cached_ip_s = explode(':', file_get_contents($filename));
@@ -108,7 +114,12 @@ if ($_REQUEST['getdyndnsstatus']) {
</tr>
</thead>
<tbody>
- <?php $dyndnsid = 0; foreach ($a_dyndns as $dyndns): ?>
+ <?php $dyndnsid = 0; foreach ($a_dyndns as $dyndns):
+ if ($dyndns['type'] == "namecheap") {
+ $hostname = $dyndns['host'] . "." . $dyndns['domainname'];
+ } else {
+ $hostname = $dyndns['host'];
+ } ?>
<tr ondblclick="document.location='services_dyndns_edit.php?id=<?=$dyndnsid;?>'"<?=!isset($dyndns['enable'])?' class="disabled"':''?>>
<td>
<?php $iflist = get_configured_interface_with_descr();
@@ -141,7 +152,7 @@ if ($_REQUEST['getdyndnsstatus']) {
</td>
<td>
<?php
- print(htmlspecialchars($dyndns['host']));
+ print(htmlspecialchars($hostname));
?>
</td>
<td>
OpenPOWER on IntegriCloud