Add TLD registry import/export/create & logging
Add CSV/JSON export and import endpoints and UI for the TLD registry, plus a manual Create TLD modal and drag-and-drop import UX. Standardize import/export logging by adding Logger('import'/'export') calls to Domains, Tags, Notification Groups and TLD flows. Add TldRegistry model helpers (findByTld, getAll) used for deduplication and exports. Update routes for /tld-registry export/import/create and add a migration to bump app_version to 1.1.4. Also update default app_version, enhance WhoisService parsing (registrar regex and ISO-8601 date handling), and adjust the TLD registry index view to include IANA and Export dropdowns, import modal, create modal, and related JS behavior.
This commit is contained in:
@@ -938,7 +938,7 @@ class WhoisService
|
||||
}
|
||||
|
||||
// Registrar (only take the first valid one found) - for standard format
|
||||
if (!$registrarFound && preg_match('/^registrar(?!.*url|.*whois|.*iana|.*phone|.*email|.*fax|.*abuse|.*id|.*contact)/i', $key) && !empty($value)) {
|
||||
if (!$registrarFound && preg_match('/^registrar(?!.*url|.*whois|.*iana|.*phone|.*email|.*fax|.*abuse|.*id|.*contact|.*date|.*expir)/i', $key) && !empty($value)) {
|
||||
// Skip if it looks like a phone number, email, or ID
|
||||
if (!preg_match('/^[\+\d\.\s\(\)-]+$/', $value) &&
|
||||
!preg_match('/@/', $value) &&
|
||||
@@ -1041,6 +1041,11 @@ class WhoisService
|
||||
$dateString = preg_replace('/^(before|after):/i', '', $dateString);
|
||||
$dateString = trim($dateString);
|
||||
|
||||
// ISO-8601 format (e.g. ZARC: 2026-10-15T12:00:00Z or 2026-10-15T12:00:00+00:00)
|
||||
if (preg_match('/^(\d{4}-\d{2}-\d{2})T\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?(?:Z|[+-]\d{2}:?\d{2})?$/i', $dateString, $m)) {
|
||||
return $m[1];
|
||||
}
|
||||
|
||||
// Handle DD/MM/YYYY format (European format used by many WHOIS servers like .pt, .es, .fr, etc.)
|
||||
// Pattern: DD/MM/YYYY or DD/MM/YYYY HH:MM:SS
|
||||
if (preg_match('#^(\d{1,2})/(\d{1,2})/(\d{4})(.*)$#', $dateString, $matches)) {
|
||||
|
||||
Reference in New Issue
Block a user