|
|
@@ -57,13 +57,13 @@ class InfoSettingDataProvider extends BaseDataProvider
|
|
|
/**
|
|
|
* format model to array
|
|
|
*/
|
|
|
- in_array($domain,$clientDomains) ? $selfdomain = 1 : $selfdomain = 0;
|
|
|
- $dnsRecords = $dns->getRecords($domain);
|
|
|
+ in_array($maildomain,$clientDomains) ? $selfdomain = 1 : $selfdomain = 0;
|
|
|
+ $dnsRecords = $dns->getRecords($maildomain);
|
|
|
$dnsRecords['selfdns'] ? $selfDns = 1 : $selfDns = 0;
|
|
|
if(empty($dnsRecords['mx'])){
|
|
|
$mx = 'unset';
|
|
|
} else {
|
|
|
- in_array($params['serverhostname'],$dnsRecords['mx']) ? $mx = $dnsRecords['mx'] : $mx = 'wrong';
|
|
|
+ in_array($this->getWhmcsParamByKey('serverhostname'),$dnsRecords['mx']) ? $mx = $dnsRecords['mx'] : $mx = 'wrong';
|
|
|
}
|
|
|
if(empty($dnsRecords['spf'])) {
|
|
|
$spf = 'unset';
|
|
|
@@ -93,8 +93,8 @@ class InfoSettingDataProvider extends BaseDataProvider
|
|
|
}
|
|
|
in_array($this->domainKey, $dnsRecords['dkim']) ? $dkim = 'set' : $dkim = 'unset';
|
|
|
$this->data = [
|
|
|
- 'id' => $domain,
|
|
|
- 'domain' => $domain,
|
|
|
+ 'id' => $maildomain,
|
|
|
+ 'domain' => $maildomain,
|
|
|
'mxactive' => $dnsRecords['mx'],
|
|
|
'spf' => $spf,
|
|
|
'dmarc' => $dmarc,
|
|
|
@@ -107,14 +107,6 @@ class InfoSettingDataProvider extends BaseDataProvider
|
|
|
'dkimthurdata' => $this->dkimName. ' TXT ' . $this->domainKey
|
|
|
];
|
|
|
$this->availableValues['dnsrecords'] = $dnsRecords;
|
|
|
- logModuleCall(
|
|
|
- 'kerioEmail',
|
|
|
- __FUNCTION__,
|
|
|
- $this->getWhmcsParamByKey('userid'),
|
|
|
- 'Debug Data',
|
|
|
- $clientDomains
|
|
|
- );
|
|
|
-
|
|
|
}
|
|
|
|
|
|
public function create()
|