diff --git a/src/etc/inc/plugins.inc.d/dyndns.inc b/src/etc/inc/plugins.inc.d/dyndns.inc index f1b1a4671..7eb8e9654 100644 --- a/src/etc/inc/plugins.inc.d/dyndns.inc +++ b/src/etc/inc/plugins.inc.d/dyndns.inc @@ -127,7 +127,7 @@ function dyndns_cache_file($conf, $ipver = 4) { $ipver = $ipver == 6 ? '_v6' : ''; - return "/var/cache/dyndns_{$conf['interface']}_{$conf['host']}_{$dyndns['id']}{$ipver}.cache"; + return "/var/cache/dyndns_{$conf['interface']}_{$conf['host']}_{$conf['id']}{$ipver}.cache"; } function dyndns_configure_client($conf) diff --git a/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc b/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc index cf003ee83..a73d1c3df 100644 --- a/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc +++ b/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc @@ -1252,7 +1252,7 @@ $currentTime = time(); notify_all_remote(sprintf(gettext("Dynamic DNS updated IP Address on %s (%s) to %s"), convert_real_interface_to_friendly_descr($this->_if), $this->_if, $wan_ip)); log_error("Dynamic DNS: updating cache file {$this->_cacheFile}: {$wan_ip}"); - @file_put_contents($this->_cacheFile, "{$wan_ip}:{$currentTime}"); + @file_put_contents($this->_cacheFile, "{$wan_ip}|{$currentTime}"); } else @unlink($this->_cacheFile); if ($this->_useIPv6 == true && $wan_ip > 0) { @@ -1345,13 +1345,13 @@ } else { if (file_exists($this->_cacheFile)) { $contents = file_get_contents($this->_cacheFile); - list($cacheIP,$cacheTime) = explode(':', $contents); + list($cacheIP,$cacheTime) = explode('|', $contents); $this->_debug($cacheIP.'/'.$cacheTime); $initial = false; $log_error .= "Cached IP: {$cacheIP} "; } else { $cacheIP = '0.0.0.0'; - @file_put_contents($this->_cacheFile, "0.0.0.0:{$currentTime}"); + @file_put_contents($this->_cacheFile, "0.0.0.0|{$currentTime}"); $cacheTime = $currentTime; $initial = true; $log_error .= "No Cached IP found."; diff --git a/src/etc/inc/plugins.inc.d/rfc2136.inc b/src/etc/inc/plugins.inc.d/rfc2136.inc index c23a01f42..16c9a364c 100644 --- a/src/etc/inc/plugins.inc.d/rfc2136.inc +++ b/src/etc/inc/plugins.inc.d/rfc2136.inc @@ -84,7 +84,7 @@ function rfc2136_cron() return $jobs; } -function rfc2136_cache_file($dnspdate, $ipver = 4) +function rfc2136_cache_file($dnsupdate, $ipver = 4) { $ipver = $ipver == 6 ? '_v6' : ''; diff --git a/src/www/services_dyndns.php b/src/www/services_dyndns.php index ddab3cec8..9d3b9a2c6 100644 --- a/src/www/services_dyndns.php +++ b/src/www/services_dyndns.php @@ -162,7 +162,7 @@ $main_buttons = array( } if (!empty($fdata)) { - $cached_ip_s = explode(':', $fdata); + $cached_ip_s = explode('|', $fdata); $cached_ip = $cached_ip_s[0]; echo sprintf( '%s', diff --git a/src/www/services_rfc2136.php b/src/www/services_rfc2136.php index b6095e9c6..f62059177 100644 --- a/src/www/services_rfc2136.php +++ b/src/www/services_rfc2136.php @@ -148,7 +148,7 @@ $main_buttons = array( "; $filename6 = rfc2136_cache_file($rfc2136, 6); - if (file_exists($filename6) && !empty($rfc2136['enable']) && (empty($dnsupdate['recordtype']) || $dnsupdate['recordtype'] == 'AAAA')) { + if (file_exists($filename6) && !empty($rfc2136['enable']) && (empty($rfc2136['recordtype']) || $rfc2136['recordtype'] == 'AAAA')) { echo "IPv6: "; if (isset($rfc2136['usepublicip'])) { $ipaddr = get_dyndns_ip($rfc2136['interface'], 6); diff --git a/src/www/widgets/widgets/dyn_dns_status.widget.php b/src/www/widgets/widgets/dyn_dns_status.widget.php index b346bc069..5d73cab61 100644 --- a/src/www/widgets/widgets/dyn_dns_status.widget.php +++ b/src/www/widgets/widgets/dyn_dns_status.widget.php @@ -65,7 +65,7 @@ if (!empty($_REQUEST['getdyndnsstatus'])) { } if (!empty($fdata)) { - $cached_ip_s = preg_split('/:/', $fdata); + $cached_ip_s = explode('|', $fdata); $cached_ip = $cached_ip_s[0]; echo sprintf( '%s',