Skip to content

Commit 5501be8

Browse files
author
Till Brehm
committed
Fixed #3980 Subdomain (vhost) - Domain added to host each save
1 parent 4562888 commit 5501be8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

interface/web/sites/web_vhost_domain_edit.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,11 +802,16 @@ function onShowEnd() {
802802
$domain_select .= "<option value=''></option>\r\n";
803803
}
804804
$app->tpl->setVar("domain_option", $domain_select);
805-
} else {
805+
806+
// remove the parent domain part of the domain name before we show it in the text field.
807+
if($this->dataRecord["type"] == 'vhostsubdomain') $this->dataRecord["domain"] = str_replace('.'.$selected_domain, '', $this->dataRecord["domain"]);
806808

809+
810+
} else {
807811
// remove the parent domain part of the domain name before we show it in the text field.
808812
if($this->dataRecord["type"] == 'vhostsubdomain') $this->dataRecord["domain"] = str_replace('.'.$parent_domain["domain"], '', $this->dataRecord["domain"]);
809813
}
814+
810815
if($this->_vhostdomain_type != 'domain') $app->tpl->setVar("domain", $this->dataRecord["domain"]);
811816

812817
// check for configuration errors in sys_datalog

0 commit comments

Comments
 (0)