From 056b11eb05c5bb21af23b87c0dc4157f86d62e48 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Thu, 27 Sep 2012 09:32:14 +0000
Subject: [PATCH] Bugfix: wrong host name when using domain module

---
 interface/web/sites/web_vhost_subdomain_edit.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/interface/web/sites/web_vhost_subdomain_edit.php b/interface/web/sites/web_vhost_subdomain_edit.php
index 761be8801..56ba15db0 100644
--- a/interface/web/sites/web_vhost_subdomain_edit.php
+++ b/interface/web/sites/web_vhost_subdomain_edit.php
@@ -288,7 +288,6 @@ class page_action extends tform_actions {
 		$this->dataRecord["ipv6_address"] = $parent_domain["ipv6_address"];
 		$this->dataRecord["client_group_id"] = $parent_domain["client_group_id"];
 		$this->dataRecord["vhost_type"] = 'name';
-		$this->dataRecord["domain"] = $this->dataRecord["domain"].'.'.$parent_domain["domain"];
 
 		$this->parent_domain_record = $parent_domain;
         
@@ -328,6 +327,8 @@ class page_action extends tform_actions {
             if($check && $check['cnt'] > 0) {
                 $app->tform->errorMessage .= $app->tform->lng("web_folder_unique_txt")."<br>";
             }
+        } else {
+            $this->dataRecord["domain"] = $this->dataRecord["domain"].'.'.$parent_domain["domain"];
         }
         
 		if($_SESSION["s"]["user"]["typ"] != 'admin') {
-- 
GitLab