mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-26 04:18:29 +02:00
Further formatting fixes and internal host fix
This commit is contained in:
parent
cfcb51b9f8
commit
5084e1f6ee
1 changed files with 8 additions and 6 deletions
|
@ -664,7 +664,7 @@ class DomainsController extends Controller
|
||||||
|
|
||||||
$db->exec(
|
$db->exec(
|
||||||
'INSERT INTO payment_history (registrar_id, date, description, amount) VALUES (?, CURRENT_TIMESTAMP(3), ?, ?)',
|
'INSERT INTO payment_history (registrar_id, date, description, amount) VALUES (?, CURRENT_TIMESTAMP(3), ?, ?)',
|
||||||
[$clid, "create domain $domainName for period $date_add MONTH", "-$price"]
|
[$clid, "create domain " . strtolower($domainName) . " for period $date_add MONTH", "-$price"]
|
||||||
);
|
);
|
||||||
|
|
||||||
$row = $db->selectRow(
|
$row = $db->selectRow(
|
||||||
|
@ -682,7 +682,7 @@ class DomainsController extends Controller
|
||||||
'registrar_id' => $clid,
|
'registrar_id' => $clid,
|
||||||
'date' => $stdate,
|
'date' => $stdate,
|
||||||
'command' => 'create',
|
'command' => 'create',
|
||||||
'domain_name' => $domainName,
|
'domain_name' => strtolower($domainName),
|
||||||
'length_in_months' => $date_add,
|
'length_in_months' => $date_add,
|
||||||
'fromS' => $from,
|
'fromS' => $from,
|
||||||
'toS' => $to,
|
'toS' => $to,
|
||||||
|
@ -692,13 +692,15 @@ class DomainsController extends Controller
|
||||||
|
|
||||||
if (!empty($nameservers)) {
|
if (!empty($nameservers)) {
|
||||||
foreach ($nameservers as $index => $nameserver) {
|
foreach ($nameservers as $index => $nameserver) {
|
||||||
|
|
||||||
$internal_host = false;
|
$internal_host = false;
|
||||||
|
|
||||||
|
$parts_host = extractDomainAndTLD($nameserver);
|
||||||
|
$host_extension = $parts_host['tld'];
|
||||||
$result = $db->select('SELECT tld FROM domain_tld');
|
$result = $db->select('SELECT tld FROM domain_tld');
|
||||||
|
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
if ('.' . strtoupper($domain_extension) === strtoupper($row['tld'])) {
|
if ('.' . strtoupper($host_extension) === strtoupper($row['tld'])) {
|
||||||
$internal_host = true;
|
$internal_host = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -743,7 +745,7 @@ class DomainsController extends Controller
|
||||||
$db->insert(
|
$db->insert(
|
||||||
'host',
|
'host',
|
||||||
[
|
[
|
||||||
'name' => $nameserver,
|
'name' => strtolower($nameserver),
|
||||||
'domain_id' => $domain_id,
|
'domain_id' => $domain_id,
|
||||||
'clid' => $clid,
|
'clid' => $clid,
|
||||||
'crid' => $clid,
|
'crid' => $clid,
|
||||||
|
@ -755,7 +757,7 @@ class DomainsController extends Controller
|
||||||
$db->insert(
|
$db->insert(
|
||||||
'host',
|
'host',
|
||||||
[
|
[
|
||||||
'name' => $nameserver,
|
'name' => strtolower($nameserver),
|
||||||
'clid' => $clid,
|
'clid' => $clid,
|
||||||
'crid' => $clid,
|
'crid' => $clid,
|
||||||
'crdate' => $host_date
|
'crdate' => $host_date
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue