Browse Source

new info form

andre 5 months ago
parent
commit
3c4f3afdc8
1 changed files with 5 additions and 13 deletions
  1. 5 13
      app/UI/Client/Setting/Providers/InfoSettingDataProvider.php

+ 5 - 13
app/UI/Client/Setting/Providers/InfoSettingDataProvider.php

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