summaryrefslogtreecommitdiffstats
path: root/modules/base
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-05 00:55:17 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-05 00:55:17 -0400
commita641854cad6dddda551a2995c765e970f7cea8ba (patch)
tree9ed5c0e085ed7f31461f82a224856dc86a14a77b /modules/base
parentbb0bc0a240acf745001c1cb3f0f64c8fb8ab696b (diff)
downloadgitea-a641854cad6dddda551a2995c765e970f7cea8ba.tar.gz
gitea-a641854cad6dddda551a2995c765e970f7cea8ba.zip
command dump
Diffstat (limited to 'modules/base')
-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)