Ver código fonte

client area functions

andre 6 meses atrás
pai
commit
e1af384ddf
1 arquivos alterados com 13 adições e 4 exclusões
  1. 13 4
      core/Helper/DnsHelper.php

+ 13 - 4
core/Helper/DnsHelper.php

@@ -192,15 +192,24 @@ class DnsHelper
     function KerioEmailsetDNS()
     {
         $zoneIDcollection = Capsule::table('dns_manager2_zone')
-            ->select('relid')
+            ->select('id')
             ->where('name', '=', $this->params['domain'])
             ->get();
         $zoneIDobj = $zoneIDcollection[0];
-        $zoneID = $zoneIDobj->{'relid'};
+        $zoneID = $zoneIDobj->{'id'};
         if(!isset($zoneID)) {
             return 'Error: zone ID not found for domain ' . $this->params['domain'];
         }
-        $dnsZone = localAPI('dnsmanager', array( 'dnsaction' => 'getZone', 'zone_id' => $zoneID));
+        $dnsZone = localAPI('dnsmanager', array( 'dnsaction' => 'getZone', 'zone_name' => $this->params['domain']));
+        
+            logModuleCall(
+                'kerioEmail',
+                __FUNCTION__,
+                $this->params,
+                'DEbug',
+                $dnsZone
+            );
+
         if($dnsZone['result'] != 'success') {
             return 'Error: cloud not fetch zone for ID ' . $zoneID;
         }
@@ -266,7 +275,7 @@ class DnsHelper
         } */
         return 'success';
     }
-
+    
     function KerioEmailunsetMX()
     {
         $zoneIDcollection = Capsule::table('dns_manager2_zone')