andre 5 mesiacov pred
rodič
commit
dfb9b594e7
1 zmenil súbory, kde vykonal 5 pridanie a 4 odobranie
  1. 5 4
      app/UI/Client/Setting/Pages/Settings.php

+ 5 - 4
app/UI/Client/Setting/Pages/Settings.php

@@ -178,9 +178,10 @@ class Settings extends DataTable implements ClientArea
     public function loadData()
     public function loadData()
     {
     {
         $maildomain = $this->getWhmcsParamByKey('domain');
         $maildomain = $this->getWhmcsParamByKey('domain');
+        $mailserver = $this->getWhmcsParamByKey('serverhostname');
         $api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
         $api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
         try {
         try {
-            $api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
+            $api->login($mailserver, $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
             $domains = $api->getDomains(['id','name','aliasList']);
             $domains = $api->getDomains(['id','name','aliasList']);
             $dkimSet = $api->getDkimDnsRecord($maildomain);
             $dkimSet = $api->getDkimDnsRecord($maildomain);
         } catch (KerioApiException $error) {
         } catch (KerioApiException $error) {
@@ -233,14 +234,14 @@ class Settings extends DataTable implements ClientArea
             if(empty($dnsRecords['mx'])){
             if(empty($dnsRecords['mx'])){
                 $mx = 'unset';
                 $mx = 'unset';
             } else {
             } else {
-                in_array($params['serverhostname'],$dnsRecords['mx']) ? $mx = 'set' : $mx = 'wrong';
+                in_array($mailserver,$dnsRecords['mx']) ? $mx = 'set' : $mx = 'wrong';
 
 
                 logModuleCall(
                 logModuleCall(
                     'kerioEmail',
                     'kerioEmail',
                     __FUNCTION__,
                     __FUNCTION__,
-                    $params['serverhostname'],
+                    $mailserver,
                     'Debug Error',
                     'Debug Error',
-                    $dnsRecords['mx']
+                    $params['userid']
                 );
                 );
 
 
             }
             }