add flag to allow access to dns-editor per customer; clean up dns-entries when domain gets deleted

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2016-05-18 13:25:31 +02:00
parent b14ab6b1c1
commit 83fa0059de
8 changed files with 72 additions and 3 deletions

View File

@@ -245,6 +245,15 @@ if ($page == 'domains' || $page == 'overview') {
'domainid' => $id
));
// remove possible existing DNS entries
$del_stmt = Database::prepare("
DELETE FROM `" . TABLE_DOMAIN_DNS . "`
WHERE `domain_id` = :domainid
");
Database::pexecute($del_stmt, array(
'domainid' => $id
));
triggerLetsEncryptCSRForAliasDestinationDomain($result['aliasdomain'], $log);
$log->logAction(ADM_ACTION, LOG_INFO, "deleted domain/subdomains (#" . $result['id'] . ")");