From d66e375d8a6a63b02a7c231e0b37a96aa8e1a50a Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Wed, 22 Jan 2014 10:02:17 +0100 Subject: [PATCH] remove connections domain<->ip when removing subdomains as customer Signed-off-by: Michael Kaufmann (d00p) --- customer_domains.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/customer_domains.php b/customer_domains.php index 5bf09c65..9b67417c 100644 --- a/customer_domains.php +++ b/customer_domains.php @@ -190,6 +190,19 @@ if ($page == 'overview') { ); Database::pexecute($stmt, array("customerid" => $userinfo['customerid'])); + // remove connections to ips and domainredirects + $del_stmt = Database::prepare(" + DELETE FROM `" . TABLE_DOMAINTOIP . "` + WHERE `id_domain` = :domainid" + ); + Database::pexecute($del_stmt, array('domainid' => $id)); + + $del_stmt = Database::prepare(" + DELETE FROM `" . TABLE_PANEL_DOMAINREDIRECTS . "` + WHERE `did` = :domainid" + ); + Database::pexecute($del_stmt, array('domainid' => $id)); + inserttask('1'); // Using nameserver, insert a task which rebuilds the server config