Improved TLDs interface

Also fixed IDN table export issue
This commit is contained in:
Pinga 2025-03-31 18:25:16 +03:00
parent 30682342a8
commit ab0c6342c3
3 changed files with 20 additions and 1 deletions

View file

@ -1749,6 +1749,11 @@ class SystemController extends Controller
$idn_table = $db->selectValue('SELECT idn_table FROM domain_tld WHERE tld = ?',
[ $args ]);
if (!$idn_table) {
$this->container->get('flash')->addMessage('error', 'TLD does not exist');
return $response->withHeader('Location', '/registry/tlds')->withStatus(302);
}
$idn_table_map = [
'/^(?!-)(?!.*--)[A-Z0-9-]{1,63}(?<!-)(.(?!-)(?!.*--)[A-Z0-9-]{1,63}(?<!-))*$/i' => 'ascii',
'/^[а-яА-ЯґҐєЄіІїЇѝЍћЋљЈ0-9ʼѫѣѭ]+$/u' => 'cyrillic',