From d4d985e00f1f70dd390bd5aaf40062416d73f4e7 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 17 Nov 2008 12:02:44 -0500
Subject: [PATCH] Data records are now assigned to the correct client group if they were created by the administrator.

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

diff --git a/interface/web/mail/mail_get_edit.php b/interface/web/mail/mail_get_edit.php
index 573fe78..4cc301c 100644
--- a/interface/web/mail/mail_get_edit.php
+++ b/interface/web/mail/mail_get_edit.php
@@ -99,6 +99,14 @@
 		parent::onSubmit();
 	}
 	
+	function onAfterInsert() {
+		global $app;
+		
+		$tmp = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_user WHERE email = '".mysql_real_escape_string($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