diff --git a/admin_domains.php b/admin_domains.php index 1f33111c..af9729b8 100644 --- a/admin_domains.php +++ b/admin_domains.php @@ -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)); + } } } diff --git a/customer_domains.php b/customer_domains.php index 9b67417c..5d20412d 100644 --- a/customer_domains.php +++ b/customer_domains.php @@ -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`