Browse code

Zeige ASCII-Form bei IDN Domains zusätzlich an.

Bernd Wurst authored on09/01/2018 05:28:23
Showing1 changed files
... ...
@@ -68,7 +68,13 @@ foreach ($user_domains as $domain)
68 68
   $features = implode(', ', $features);
69 69
   if (! $features)
70 70
     $features = '<em>unbenutzt</em>';
71
-  output("  <tr><td>{$domain->fqdn}</td><td>{$regdate}</td><td>{$features}</td></tr>\n");
71
+  $punycode = idn_to_ascii($domain->fqdn, 0, INTL_IDNA_VARIANT_UTS46);
72
+  if ($punycode != $domain->fqdn) {
73
+    $punycode = "<br/>($punycode)";
74
+  } else {
75
+    $punycode = '';
76
+  }
77
+  output("  <tr><td>{$domain->fqdn}{$punycode}</td><td>{$regdate}</td><td>{$features}</td></tr>\n");
72 78
 }
73 79
 output('</table>');
74 80
 output("<br />");