From b67344233b509c97ba118a209e82386d698ba068 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 05 Apr 2012 05:09:17 -0400
Subject: [PATCH] Merged revisions 2943-3026 from stable branch.
---
interface/web/mail/mail_domain_del.php | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/interface/web/mail/mail_domain_del.php b/interface/web/mail/mail_domain_del.php
index c2c32ad..d686341 100644
--- a/interface/web/mail/mail_domain_del.php
+++ b/interface/web/mail/mail_domain_del.php
@@ -42,11 +42,8 @@
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
-// Checke Berechtigungen f�r Modul
-if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) {
- header("Location: ../index.php");
- exit;
-}
+//* Check permissions for module
+$app->auth->check_module_permissions('mail');
// Loading classes
$app->uses('tpl,tform,tform_actions');
@@ -80,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