std-subdomain <> ip connection is already handled by Domains::add()

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2018-02-16 13:55:12 +01:00
parent 1e45da2410
commit 8978dd3a4b

View File

@@ -537,21 +537,9 @@ class Customers extends ApiCommand
}
if ($domainid > 0) {
// set ip <-> domain connection
$defaultips = explode(',', Settings::Get('system.defaultip'));
$ins_stmt = Database::prepare("
INSERT INTO `" . TABLE_DOMAINTOIP . "` SET `id_domain` = :domainid, `id_ipandports` = :ipid
");
foreach ($defaultips as $defaultip) {
Database::pexecute($ins_stmt, array(
'domainid' => $domainid,
'ipid' => $defaultip
), true, true);
}
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `standardsubdomain` = :domainid WHERE `customerid` = :customerid
");
UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `standardsubdomain` = :domainid WHERE `customerid` = :customerid
");
Database::pexecute($upd_stmt, array(
'domainid' => $domainid,
'customerid' => $customerid