fix import existing resources for old dns providers (including SimpleDNS)
This commit is contained in:
parent
50e61dbfdf
commit
716855ae05
1 changed files with 4 additions and 1 deletions
|
@ -32,6 +32,7 @@ using System.Collections.Specialized;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
using System.Text;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using WebsitePanel.Providers;
|
using WebsitePanel.Providers;
|
||||||
using WebsitePanel.Providers.DNS;
|
using WebsitePanel.Providers.DNS;
|
||||||
|
@ -385,7 +386,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
var idn = new IdnMapping();
|
var idn = new IdnMapping();
|
||||||
|
|
||||||
if (itemType == typeof(DnsZone))
|
if (itemType == typeof(DnsZone))
|
||||||
items.AddRange(dns.GetZones().Select(z => idn.GetUnicode(z)));
|
items.AddRange(dns.GetZones().Select(z =>
|
||||||
|
Encoding.UTF8.GetByteCount(z) == z.Length ? // IsASCII
|
||||||
|
idn.GetUnicode(z) : z ));
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue