From 6bef3414518e2692751d84f0ef2488b4aabad50f Mon Sep 17 00:00:00 2001 From: Valentin Ghica Date: Mon, 14 Jul 2014 01:03:15 +0300 Subject: [PATCH] Update controller.ext.php There is a problem in the original function when create defaults nameservers first of all does not create ns1.example.com only creates example.com and does not write the bind config files. I had that problem and modifying this file solved that problem. Tested on my webserver at danvaly.ro --- modules/dns_admin/code/controller.ext.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/dns_admin/code/controller.ext.php b/modules/dns_admin/code/controller.ext.php index 6f7571389..2e9e7a0f5 100644 --- a/modules/dns_admin/code/controller.ext.php +++ b/modules/dns_admin/code/controller.ext.php @@ -989,18 +989,18 @@ static function CreateDefaultRecords($vh_acc_fk) 'NS', '@', 172800, - :vh_name_vc2, + :ns1, NULL, NULL, NULL, :time)"); $sql->bindParam(':userID', $userID); $Domain = 'ns1.' . $domainName['vh_name_vc']; - $sql->bindParam(':vh_name_vc', $Domain); + $sql->bindParam(':ns1', $Domain); $sql->bindParam(':domainID', $domainID); $time = time(); $sql->bindParam(':time', $time); - $sql->bindParam(':vh_name_vc2', $domainName['vh_name_vc']); + $sql->bindParam(':vh_name_vc', $domainName['vh_name_vc']); $sql->execute(); $sql = $zdbh->prepare("INSERT INTO x_dns (dn_acc_fk, dn_name_vc, @@ -1032,6 +1032,10 @@ static function CreateDefaultRecords($vh_acc_fk) $sql->bindParam(':time', $time); $sql->bindParam(':vh_name_vc', $domainName['vh_name_vc']); $sql->execute(); + + self::TriggerDNSUpdate($domainID); + + return; }