From 897af06af9522ded99b1e0f46730299e89856ffe Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 11 Jun 2012 05:00:57 -0400
Subject: [PATCH] Updated version number to 3.0.4.6

---
 interface/web/mail/mail_domain_del.php |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/interface/web/mail/mail_domain_del.php b/interface/web/mail/mail_domain_del.php
index f9fbc09..d686341 100644
--- a/interface/web/mail/mail_domain_del.php
+++ b/interface/web/mail/mail_domain_del.php
@@ -77,7 +77,17 @@
 			$app->db->datalogDelete('mail_user','mailuser_id',$rec['id']);
 		}
 		
+		// Delete all spamfilters that belong to this domain
+		$records = $app->db->queryAllRecords("SELECT id FROM spamfilter_users WHERE email = '@".$app->db->quote($domain)."'");
+		foreach($records as $rec) {
+			$app->db->datalogDelete('spamfilter_users','id',$rec['id']);
+		}
 		
+		// Delete all mailinglists that belong to this domain
+		$records = $app->db->queryAllRecords("SELECT mailinglist_id FROM mail_mailinglist WHERE domain = '".$app->db->quote($domain)."'");
+		foreach($records as $rec) {
+			$app->db->datalogDelete('mail_mailinglist','mailinglist_id',$rec['id']);
+		}
 		
 	}
 }

--
Gitblit v1.9.1