From 8978dd3a4bdb6b5fc2b7c5e78946c5b0e1b63cea Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Fri, 16 Feb 2018 13:55:12 +0100 Subject: [PATCH] std-subdomain <> ip connection is already handled by Domains::add() Signed-off-by: Michael Kaufmann (d00p) --- lib/classes/api/commands/class.Customers.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/lib/classes/api/commands/class.Customers.php b/lib/classes/api/commands/class.Customers.php index 8e72e50a..cad36cfe 100644 --- a/lib/classes/api/commands/class.Customers.php +++ b/lib/classes/api/commands/class.Customers.php @@ -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