From b72e75e522dda88dcbf7b064b8af3c495deb0595 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 12 Mar 2015 20:32:38 -0400 Subject: [PATCH] #1024: OFFLINE_MODE Still Uses Gravatar --- models/user.go | 2 +- modules/base/tool.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/user.go b/models/user.go index ea5041bdff7..f3a6c38f624 100644 --- a/models/user.go +++ b/models/user.go @@ -124,7 +124,7 @@ func (u *User) AvatarLink() string { switch { case u.UseCustomAvatar: return setting.AppSubUrl + "/avatars/" + com.ToStr(u.Id) - case setting.DisableGravatar: + case setting.DisableGravatar, setting.OfflineMode: return setting.AppSubUrl + "/img/avatar_default.jpg" case setting.Service.EnableCacheAvatar: return setting.AppSubUrl + "/avatar/" + u.Avatar diff --git a/modules/base/tool.go b/modules/base/tool.go index 55e6dffd96b..92f493afe28 100644 --- a/modules/base/tool.go +++ b/modules/base/tool.go @@ -171,7 +171,7 @@ func CreateTimeLimitCode(data string, minutes int, startInf interface{}) string // AvatarLink returns avatar link by given e-mail. func AvatarLink(email string) string { - if setting.DisableGravatar { + if setting.DisableGravatar || setting.OfflineMode { return setting.AppSubUrl + "/img/avatar_default.jpg" }