andre 5 сар өмнө
parent
commit
b3a7b57f4c

+ 18 - 20
app/UI/Client/Setting/Pages/Settings.php

@@ -169,21 +169,27 @@ class Settings extends DataTable implements ClientArea
 
         foreach($domains as $domain){
             in_array($domain,$clientDomains) ? $selfdomain = 'active' : $selfdomain = 'inactive';
+            $selfDns = 'inactive';
             $zoneID = $dns->selfDns($domain);
-//            if($zoneID){
+            if($zoneID){
                 $selfDns = 'active';
                 $dnsZone = $dns->getZone($zoneID);
-
-
-  //          } else {
-    //            $selfDns = 'inactive';
-                $dnsRecords = $dns->getMX($domain);
-                $dnsRecords['mx'] == 'set' ? $mx = 'active' : $mx = 'inactive';
-                $dnsRecords = $dns->getTxtRecords($domain);
-                $dnsRecords['spf'] == 'set' ? $spf = 'active' : $spf = 'inactive';
-                $dnsRecords['dmarc'] == 'set' ? $dmarc = 'active' : $dmarc = 'inactive';
-                $dnsRecords['dkim'] == 'set' ? $dkim = 'active' : $dkim = 'inactive';
-    //        }
+                logModuleCall(
+                    'kerioEmail',
+                    __FUNCTION__,
+                    $dnsZone,
+                    'Debug Settings',
+                    $zoneID
+                );
+
+
+            } 
+            $dnsRecords = $dns->getMX($domain);
+            $dnsRecords['mx'] == 'set' ? $mx = 'active' : $mx = 'inactive';
+            $dnsRecords = $dns->getTxtRecords($domain);
+            $dnsRecords['spf'] == 'set' ? $spf = 'active' : $spf = 'inactive';
+            $dnsRecords['dmarc'] == 'set' ? $dmarc = 'active' : $dmarc = 'inactive';
+            $dnsRecords['dkim'] == 'set' ? $dkim = 'active' : $dkim = 'inactive';
             $tmp = [
                 'domain' => $domain,
                 'mxactive' => $mx,
@@ -196,14 +202,6 @@ class Settings extends DataTable implements ClientArea
             $data[] = $tmp;
         }
 
-        logModuleCall(
-            'kerioEmail',
-            __FUNCTION__,
-            $dnsZone,
-            'Debug Settings',
-            $dnsRecords
-        );
-
         $dataProv = new ArrayDataProvider();
         $dataProv->setDefaultSorting('setting', 'ASC')->setData($data);
         $this->setDataProvider($dataProv);