Commit c4aba1ae authored by Till Brehm's avatar Till Brehm

Fixed: #4059 can't edit existing subdomain

parent f7c61885
......@@ -157,7 +157,7 @@ class tools_sites {
$field = "domain";
$select = $field;
}
$sql .= " domain NOT IN (SELECT $select FROM ?? WHERE $field != ?) AND";
$sql .= " domain NOT IN (SELECT $select FROM ?? WHERE $field = ?) AND";
}
if ($_SESSION["s"]["user"]["typ"] == 'admin') {
$sql .= " 1";
......
......@@ -131,8 +131,10 @@ class page_action extends tform_actions {
}
$app->tpl->setVar("domain_option", $domain_select);
if($this->_childdomain_type == 'subdomain') {
$this->dataRecord['domain'] = substr($this->dataRecord["domain"], 0, strlen($this->dataRecord['domain']) - strlen($selected_domain) - 1);
//$this->dataRecord['domain'] = substr($this->dataRecord["domain"], 0, strlen($this->dataRecord['domain']) - strlen($selected_domain) - 1);
$this->dataRecord["domain"] = str_replace('.'.$selected_domain, '', $this->dataRecord["domain"]);
}
} else {
if($this->_childdomain_type == 'subdomain') {
// Get the record of the parent domain
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment