From 0da417be0e8d1135ee5a7491a97780285745fd13 Mon Sep 17 00:00:00 2001 From: Erik Kristensen Date: Fri, 14 Oct 2005 00:48:14 +0000 Subject: Delete cache and debug files if dyndns is not enabled. If dyndns is enabled update, should solve cache file being created upon boot when dyndns is not enabled. --- etc/inc/dyndns.class | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'etc/inc/dyndns.class') diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class index b9f543e..49d025f 100644 --- a/etc/inc/dyndns.class +++ b/etc/inc/dyndns.class @@ -35,12 +35,13 @@ * DHS - Last Tested: 12 July 2005 * ZoneEdit - Last Tested: NEVER * Dyns - Last Tested: NEVER + * ODS - Last Tested: 02 August 2005 * +====================================================+ * * @author E.Kristensen * @link http://www.idylldesigns.com/projects/phpdns/ - * @version 0.7 - * @updated 1 August 05 at 21:02:42 GMT + * @version 0.8 + * @updated 13 October 05 at 21:02:42 GMT * */ @@ -65,6 +66,8 @@ * - Gets the dice rolling for the update. */ function updatedns ($dnsService = '', $dnsHost = '', $dnsUser = '', $dnsPass = '', $dnsWildcard = 'OFF', $dnsMX = '', $dnsBackMX = '') { + global $config; + if (!$dnsService) $this->_error(2); if (!$dnsUser) $this->_error(3); if (!$dnsPass) $this->_error(4); @@ -77,6 +80,12 @@ $this->_dnsIP = $dnsIP; $this->_debugID = rand(1000000, 9999999); + if (!isset($config['dyndns']['enabled'])) { + @unlink($this->_cacheFile); + @unlink($this->_debugFile); + return true; + } + if ($this->_detectChange() == FALSE) { $this->_error(10); } else { -- cgit v1.1