Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c58c4f866a | ||
|
|
fc9f1b6bcc |
@@ -96,6 +96,13 @@ func loadThirdPartyTemplates(tmpl *template.Template) *template.Template {
|
||||
}
|
||||
|
||||
themeDir := theme.Name()
|
||||
if themeDir == "theme-custom" {
|
||||
// for backward compatibility
|
||||
// note: will remove this in future versions
|
||||
ret = loadTemplates(ret, themeDir)
|
||||
continue
|
||||
}
|
||||
|
||||
if strings.HasPrefix(themeDir, "dashboard-") {
|
||||
// load dashboard templates, ignore desc file
|
||||
ret = loadTemplates(ret, themeDir)
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ func splitDomainSOA(domain string) (prefix string, zone string, err error) {
|
||||
if len(r.Answer) > 0 {
|
||||
if soa, ok := r.Answer[0].(*dns.SOA); ok {
|
||||
zone = soa.Hdr.Name
|
||||
prefix = domain[:len(domain)-len(zone)-1]
|
||||
prefix = libdns.RelativeName(domain, zone)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,11 @@ func TestSplitDomainSOA(t *testing.T) {
|
||||
zone: "example.com.",
|
||||
prefix: "abc",
|
||||
},
|
||||
{
|
||||
domain: "example.com",
|
||||
zone: "example.com.",
|
||||
prefix: "",
|
||||
},
|
||||
}
|
||||
|
||||
for _, c := range cases {
|
||||
|
||||
Reference in New Issue
Block a user