mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-26 02:44:29 +00:00
Add the ability to override dns for iSchedule using a global variable $icfg
This commit is contained in:
parent
092cef63ca
commit
574aaf4465
@ -77,7 +77,13 @@ class iSchedule
|
|||||||
*/
|
*/
|
||||||
function getTxt ()
|
function getTxt ()
|
||||||
{
|
{
|
||||||
|
global $icfg;
|
||||||
// TODO handle parents of subdomains and procuration records
|
// 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 );
|
$dkim = dns_get_record ( $this->remote_selector . '._domainkey.' . $this->remote_server , DNS_TXT );
|
||||||
if ( count ( $dkim ) > 0 )
|
if ( count ( $dkim ) > 0 )
|
||||||
@ -186,6 +192,14 @@ class iSchedule
|
|||||||
*/
|
*/
|
||||||
function getServer ( )
|
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;
|
$this->remote_ssl = false;
|
||||||
$parts = explode ( '.', $this->domain );
|
$parts = explode ( '.', $this->domain );
|
||||||
$tld = $parts [ count ( $parts ) - 1 ];
|
$tld = $parts [ count ( $parts ) - 1 ];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user