From 269eb518145b1854b4de34109cd1827d85513013 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Fri, 25 Nov 2005 11:05:05 -0500
Subject: [PATCH] Email Black and Whitelists
---
interface/web/sites/mail_domain_catchall_edit.php | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/interface/web/sites/mail_domain_catchall_edit.php b/interface/web/sites/mail_domain_catchall_edit.php
index 83e7e7d..4ea00b0 100644
--- a/interface/web/sites/mail_domain_catchall_edit.php
+++ b/interface/web/sites/mail_domain_catchall_edit.php
@@ -49,8 +49,27 @@
// Loading classes
$app->uses('tpl,tform,tform_actions');
+$app->load('tform_actions');
-// let tform_actions handle the page
+class page_action extends tform_actions {
+
+ function onSubmit() {
+ global $app, $conf;
+
+ // Check if Domain belongs to user
+ $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = '".$app->db->quote($_POST["domain"])."' AND ".$app->tform->getAuthSQL('r'));
+ if($domain["domain"] != $_POST["domain"]) $app->tform->errorMessage .= $app->tform->wordbook["no_domain_perm"];
+
+ // Set the server id of the catchall = server ID of mail domain.
+ $this->dataRecord["server_id"] = $domain["server_id"];
+
+ parent::onSubmit();
+ }
+
+}
+
+$app->tform_actions = new page_action;
$app->tform_actions->onLoad();
+
?>
\ No newline at end of file
--
Gitblit v1.9.1