mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-24 19:38:26 +02:00
Fixed #53
This commit is contained in:
parent
f6fac77710
commit
4503cd0073
2 changed files with 41 additions and 1 deletions
|
@ -129,6 +129,28 @@ class ApplicationsController extends Controller
|
|||
'registrar' => $registrar,
|
||||
]);
|
||||
}
|
||||
|
||||
if ($phaseType === 'claims') {
|
||||
if (!isset($data['noticeid']) || $data['noticeid'] === '' ||
|
||||
!isset($data['notafter']) || $data['notafter'] === '' ||
|
||||
!isset($data['accepted']) || $data['accepted'] === '') {
|
||||
// Trigger an error or handle the situation as needed
|
||||
return view($response, 'admin/domains/createApplication.twig', [
|
||||
'domainName' => $domainName,
|
||||
'error' => "Error: 'noticeid', 'notafter', or 'accepted' cannot be empty when phaseType is 'claims'",
|
||||
'registrars' => $registrars,
|
||||
'registrar' => $registrar,
|
||||
]);
|
||||
}
|
||||
|
||||
$noticeid = $data['noticeid'];
|
||||
$notafter = $data['notafter'];
|
||||
$accepted = $data['accepted'];
|
||||
} else {
|
||||
$noticeid = null;
|
||||
$notafter = null;
|
||||
$accepted = null;
|
||||
}
|
||||
|
||||
$domain_already_reserved = $db->selectValue(
|
||||
'SELECT id FROM reserved_domain_names WHERE name = ? LIMIT 1',
|
||||
|
@ -365,7 +387,10 @@ class ApplicationsController extends Controller
|
|||
'authinfo' => $authInfo,
|
||||
'phase_name' => $phaseName,
|
||||
'phase_type' => $phaseType,
|
||||
'smd' => $smd
|
||||
'smd' => $smd,
|
||||
'tm_notice_id' => $noticeid,
|
||||
'tm_notice_accepted' => $accepted,
|
||||
'tm_notice_expires' => $notafter
|
||||
]);
|
||||
$domain_id = $db->getlastInsertId();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue