diff options
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r-- | modules/setting/setting.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 99116fff70..6b1b9fed4c 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -67,6 +67,7 @@ var ( // Picture settings. PictureService string + GravatarSource string DisableGravatar bool // Log settings. @@ -257,8 +258,13 @@ func NewConfigContext() { } ScriptType = Cfg.MustValue("repository", "SCRIPT_TYPE", "bash") - PictureService = Cfg.MustValueRange("picture", "SERVICE", "server", - []string{"server"}) + PictureService = Cfg.MustValueRange("picture", "SERVICE", "server", []string{"server"}) + switch Cfg.MustValue("picture", "GRAVATAR_SOURCE", "gravatar") { + case "duoshuo": + GravatarSource = "http://gravatar.duoshuo.com/avatar/" + default: + GravatarSource = "//1.gravatar.com/avatar/" + } DisableGravatar = Cfg.MustBool("picture", "DISABLE_GRAVATAR") MaxGitDiffLines = Cfg.MustInt("git", "MAX_GITDIFF_LINES", 10000) |