don't allow subdomains as alias-domains as it could lead to a possible dead-end for editing ip/port for the domain

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2014-10-27 10:41:29 +01:00
parent 1b00a816e3
commit 58ec17ce10
2 changed files with 5 additions and 1 deletions

View File

@@ -1697,7 +1697,9 @@ if ($page == 'domains'
Database::pexecute($ins_stmt, array('rowid' => $row['id'], 'ipportid' => $ipportid));
}
foreach ($ssl_ipandports as $ssl_ipportid) {
Database::pexecute($ins_stmt, array('rowid' => $row['id'], 'ipportid' => $ssl_ipportid));
if ($ssl_ipportid > 0) {
Database::pexecute($ins_stmt, array('rowid' => $row['id'], 'ipportid' => $ssl_ipportid));
}
}
}

View File

@@ -406,6 +406,7 @@ if ($page == 'overview') {
$domains_stmt = Database::prepare("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c`
WHERE `d`.`aliasdomain` IS NULL
AND `d`.`id` <> `c`.`standardsubdomain`
AND `d`.`parentdomainid` = '0'
AND `d`.`customerid`=`c`.`customerid`
AND `d`.`email_only`='0'
AND `d`.`customerid`= :customerid
@@ -607,6 +608,7 @@ if ($page == 'overview') {
WHERE `d`.`aliasdomain` IS NULL
AND `d`.`id` <> :id
AND `c`.`standardsubdomain` <> `d`.`id`
AND `d`.`parentdomainid` = '0'
AND `d`.`customerid` = :customerid
AND `c`.`customerid` = `d`.`customerid`
AND `d`.`id` = `dip`.`id_domain`