mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-15 00:56:59 +02:00
Housekeeping on domain and application registration
This commit is contained in:
parent
3171adc1b2
commit
52f4eab87d
2 changed files with 38 additions and 43 deletions
|
@ -1064,15 +1064,12 @@ class ApplicationsController extends Controller
|
|||
|
||||
$parts = extractDomainAndTLD($domainName);
|
||||
$label = $parts['domain'];
|
||||
$domain_extension = $parts['tld'];
|
||||
$domain_extension = '.' . strtoupper($parts['tld']);
|
||||
|
||||
$result = $db->select('SELECT id, tld FROM domain_tld');
|
||||
foreach ($result as $row) {
|
||||
if ('.' . strtoupper($domain_extension) === strtoupper($row['tld'])) {
|
||||
$tld_id = $row['id'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
$tld_id = $db->selectValue(
|
||||
"SELECT id FROM domain_tld WHERE UPPER(tld) = ?",
|
||||
[$domain_extension]
|
||||
);
|
||||
|
||||
$result = $db->selectRow('SELECT registrar_id FROM registrar_users WHERE user_id = ?', [$_SESSION['auth_user_id']]);
|
||||
|
||||
|
@ -1081,18 +1078,18 @@ class ApplicationsController extends Controller
|
|||
} else {
|
||||
$clid = $registrar_id_domain;
|
||||
}
|
||||
|
||||
|
||||
$result = $db->selectRow('SELECT accountBalance, creditLimit, currency FROM registrar WHERE id = ?', [$clid]);
|
||||
|
||||
$registrar_balance = $result['accountBalance'];
|
||||
$creditLimit = $result['creditLimit'];
|
||||
$currency = $result['currency'];
|
||||
|
||||
|
||||
$date_add = 12;
|
||||
|
||||
|
||||
$returnValue = getDomainPrice($db, $domainName, $tld_id, $date_add, 'create', $clid, $currency);
|
||||
$price = $returnValue['price'];
|
||||
|
||||
|
||||
try {
|
||||
$db->beginTransaction();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue