|
|
@@ -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')
|