From 9994de85fcf14a98dcc54cc7399b87e34d9b3c29 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 17 Mar 2009 09:23:07 -0400
Subject: [PATCH] Updated all language files.

---
 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 c17ae06..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 = '".addslashes($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