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_subdomain_edit.php | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/interface/web/sites/web_subdomain_edit.php b/interface/web/sites/web_subdomain_edit.php index 49001a3..3dd2f64 100644 --- a/interface/web/sites/web_subdomain_edit.php +++ b/interface/web/sites/web_subdomain_edit.php @@ -50,6 +50,8 @@ class page_action extends tform_actions { + var $parent_domain_record; + function onShowNew() { global $app, $conf; @@ -97,10 +99,19 @@ $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