#1098 Hide gravatar email field if gravatar is disabled (or offline mode)

This commit is contained in:
Unknwon
2015-03-24 18:38:12 -04:00
parent 6f81c05dde
commit caf7618ea6
4 changed files with 10 additions and 0 deletions

View File

@ -322,6 +322,9 @@ func NewConfigContext() {
GravatarSource = "//1.gravatar.com/avatar/"
}
DisableGravatar = sec.Key("DISABLE_GRAVATAR").MustBool()
if OfflineMode {
DisableGravatar = true
}
if err = Cfg.Section("git").MapTo(&Git); err != nil {
log.Fatal(4, "Fail to map Git settings: %v", err)