增加备案信息选项

This commit is contained in:
Minho
2018-03-19 17:46:47 +08:00
parent 57d47896c7
commit 52f5a44691
8 changed files with 52 additions and 39 deletions

View File

@@ -154,6 +154,15 @@ func (m *Option) Init() error {
}
}
if !o.QueryTable(m.TableNameWithPrefix()).Filter("option_name", "site_beian").Exist() {
option := NewOption()
option.OptionValue = ""
option.OptionName = "site_beian"
option.OptionTitle = "域名备案"
if _, err := o.Insert(option); err != nil {
return err
}
}
return nil
}