summaryrefslogtreecommitdiffstats
path: root/modules/base/tool.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-17 00:57:18 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-17 00:57:18 -0400
commit0f68930892bc49966769f8931e9a531b37dacb3b (patch)
tree2e125d90f57b3119229a62224cab807f3a79025a /modules/base/tool.go
parent664bbe4f54248b1c5e7110dc88b8d24209566a11 (diff)
downloadgitea-0f68930892bc49966769f8931e9a531b37dacb3b.tar.gz
gitea-0f68930892bc49966769f8931e9a531b37dacb3b.zip
Add latest commit in repo viewer
Diffstat (limited to 'modules/base/tool.go')
-rw-r--r--modules/base/tool.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/base/tool.go b/modules/base/tool.go
index 10b3fee375..046b2c5174 100644
--- a/modules/base/tool.go
+++ b/modules/base/tool.go
@@ -22,6 +22,11 @@ func EncodeMd5(str string) string {
return hex.EncodeToString(m.Sum(nil))
}
+// AvatarLink returns avatar link by given e-mail.
+func AvatarLink(email string) string {
+ return "http://1.gravatar.com/avatar/" + EncodeMd5(email)
+}
+
// Seconds-based time units
const (
Minute = 60