From 6eaaa70ea8ee9cd1044dbd101d6573d2e134d0f2 Mon Sep 17 00:00:00 2001
From: redray <redray@ispconfig3>
Date: Mon, 01 Dec 2008 05:19:20 -0500
Subject: [PATCH] added auto-revision from svn to version
---
interface/web/mail/mail_get_edit.php | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/interface/web/mail/mail_get_edit.php b/interface/web/mail/mail_get_edit.php
index 573fe78..ec9aeb9 100644
--- a/interface/web/mail/mail_get_edit.php
+++ b/interface/web/mail/mail_get_edit.php
@@ -92,13 +92,21 @@
} // end if user is not admin
// Set the server ID according to the selected destination
- $tmp = $app->db->queryOneRecord("SELECT server_id FROM mail_user WHERE email = '".mysql_real_escape_string($this->dataRecord["destination"])."'");
+ $tmp = $app->db->queryOneRecord("SELECT server_id FROM mail_user WHERE email = '".$app->db->quote($this->dataRecord["destination"])."'");
$this->dataRecord["server_id"] = $tmp["server_id"];
unset($tmp);
parent::onSubmit();
}
+ function onAfterInsert() {
+ global $app;
+
+ $tmp = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_user WHERE email = '".$app->db->quote($this->dataRecord["destination"])."'");
+ $app->db->query("update mail_get SET sys_groupid = ".$tmp['sys_groupid']." WHERE mailget_id = ".$this->id);
+
+ }
+
}
$page = new page_action;
--
Gitblit v1.9.1