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/sites/web_aliasdomain_edit.php |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/interface/web/sites/web_aliasdomain_edit.php b/interface/web/sites/web_aliasdomain_edit.php
index b9f6e2e..0f86b62 100644
--- a/interface/web/sites/web_aliasdomain_edit.php
+++ b/interface/web/sites/web_aliasdomain_edit.php
@@ -50,6 +50,8 @@
 
 class page_action extends tform_actions {
 	
+	var $parent_domain_record;
+	
 	function onShowNew() {
 		global $app, $conf;
 		
@@ -98,10 +100,18 @@
 		$this->dataRecord["server_id"] = $parent_domain["server_id"];
 		//$this->dataRecord["domain"] = $this->dataRecord["domain"].'.'.$parent_domain["domain"];
 		
+		$this->parent_domain_record = $parent_domain;
 		
 		parent::onSubmit();
 	}
 	
+	function onAfterInsert() {
+		global $app, $conf;
+		
+		$app->db->query('UPDATE web_domain SET sys_groupid = '.intval($this->parent_domain_record['sys_groupid']).' WHERE domain_id = '.$this->id);
+		
+	}
+	
 }
 
 $page = new page_action;

--
Gitblit v1.9.1