[fix] (for 3.5) delete ALSO autoconf / autodiscover in cascade when del_mx_domain

This commit is contained in:
Benjamin Sonntag 2018-10-23 19:27:54 +02:00
parent ad6bb372ea
commit 27f907ee99
1 changed files with 11 additions and 0 deletions

View File

@ -474,6 +474,7 @@ ORDER BY
$this->del_dns_dmarc($domain);
$this->del_dns_spf($domain);
$this->del_dns_autoconf($domain);
$this->dkim_del($domain);
$db->query("UPDATE domaines SET dns_action='UPDATE' WHERE id= ? ;", array($dom_id));
@ -1027,6 +1028,16 @@ ORDER BY
}
// ------------------------------------------------------------
/**
* delete the autoconf / autodiscover vhosts when removing a domain as MX
*/
function del_dns_autoconf($domain) {
global $db, $L_FQDN, $cuid;
$db->query("UPDATE sub_domaines SET web_action='DELETE' WHERE domaine= ? AND type='autodiscover' AND sub='autoconfig';", array($domain));
$db->query("UPDATE sub_domaines SET web_action='DELETE' WHERE domaine= ? AND type='autodiscover' AND sub='autodiscover';", array($domain));
}
// ------------------------------------------------------------
/**
* Set or UPDATE the DNS record for the domain $dom(str) to be $spf