From 574aaf446538133b47a10be5b75e9b222726ae9d Mon Sep 17 00:00:00 2001 From: Rob Ostensen Date: Sun, 11 Mar 2012 21:39:08 -0500 Subject: [PATCH] Add the ability to override dns for iSchedule using a global variable $icfg --- inc/iSchedule.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/inc/iSchedule.php b/inc/iSchedule.php index 69a8d077..2ab6e979 100644 --- a/inc/iSchedule.php +++ b/inc/iSchedule.php @@ -77,7 +77,13 @@ class iSchedule */ function getTxt () { + global $icfg; // TODO handle parents of subdomains and procuration records + if ( $icfg [ $this->remote_selector . '._domainkey.' . $this->remote_server ] ) + { + $this->dk = $icfg [ $this->remote_selector . '._domainkey.' . $this->remote_server ]; + return true; + } $dkim = dns_get_record ( $this->remote_selector . '._domainkey.' . $this->remote_server , DNS_TXT ); if ( count ( $dkim ) > 0 ) @@ -186,6 +192,14 @@ class iSchedule */ function getServer ( ) { + global $icfg; + if ( $icfg [ $this->domain ] ) + { + $this->remote_server = $icfg [ $this->domain ] [ 'server' ]; + $this->remote_port = $icfg [ $this->domain ] [ 'port' ]; + $this->remote_ssl = $icfg [ $this->domain ] [ 'ssl' ]; + return true; + } $this->remote_ssl = false; $parts = explode ( '.', $this->domain ); $tld = $parts [ count ( $parts ) - 1 ];