From 5501be8a358c44707752aa6d857af09599b4bfa9 Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Sat, 23 Jul 2016 12:15:07 -0400 Subject: [PATCH] Fixed #3980 Subdomain (vhost) - Domain added to host each save --- interface/web/sites/web_vhost_domain_edit.php | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index 6f84357..10dde97 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -802,11 +802,16 @@ $domain_select .= "<option value=''></option>\r\n"; } $app->tpl->setVar("domain_option", $domain_select); - } else { + + // remove the parent domain part of the domain name before we show it in the text field. + if($this->dataRecord["type"] == 'vhostsubdomain') $this->dataRecord["domain"] = str_replace('.'.$selected_domain, '', $this->dataRecord["domain"]); + + } else { // remove the parent domain part of the domain name before we show it in the text field. if($this->dataRecord["type"] == 'vhostsubdomain') $this->dataRecord["domain"] = str_replace('.'.$parent_domain["domain"], '', $this->dataRecord["domain"]); } + if($this->_vhostdomain_type != 'domain') $app->tpl->setVar("domain", $this->dataRecord["domain"]); // check for configuration errors in sys_datalog -- Gitblit v1.9.1