summaryrefslogtreecommitdiffstats
path: root/modules/base/tool.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/base/tool.go')
-rw-r--r--modules/base/tool.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/base/tool.go b/modules/base/tool.go
index 9b165b979b..812d7634bf 100644
--- a/modules/base/tool.go
+++ b/modules/base/tool.go
@@ -140,7 +140,9 @@ func CreateTimeLimitCode(data string, minutes int, startInf interface{}) string
// AvatarLink returns avatar link by given e-mail.
func AvatarLink(email string) string {
- if Service.EnableCacheAvatar {
+ if DisableGravatar {
+ return "/img/avatar_default.jpg"
+ } else if Service.EnableCacheAvatar {
return "/avatar/" + EncodeMd5(email)
}
return "//1.gravatar.com/avatar/" + EncodeMd5(email)