mirror of
https://github.com/go-gitea/gitea.git
synced 2024-08-24 21:34:36 -04:00
#1024: OFFLINE_MODE Still Uses Gravatar
This commit is contained in:
parent
b668fc7aad
commit
b72e75e522
@ -124,7 +124,7 @@ func (u *User) AvatarLink() string {
|
|||||||
switch {
|
switch {
|
||||||
case u.UseCustomAvatar:
|
case u.UseCustomAvatar:
|
||||||
return setting.AppSubUrl + "/avatars/" + com.ToStr(u.Id)
|
return setting.AppSubUrl + "/avatars/" + com.ToStr(u.Id)
|
||||||
case setting.DisableGravatar:
|
case setting.DisableGravatar, setting.OfflineMode:
|
||||||
return setting.AppSubUrl + "/img/avatar_default.jpg"
|
return setting.AppSubUrl + "/img/avatar_default.jpg"
|
||||||
case setting.Service.EnableCacheAvatar:
|
case setting.Service.EnableCacheAvatar:
|
||||||
return setting.AppSubUrl + "/avatar/" + u.Avatar
|
return setting.AppSubUrl + "/avatar/" + u.Avatar
|
||||||
|
@ -171,7 +171,7 @@ func CreateTimeLimitCode(data string, minutes int, startInf interface{}) string
|
|||||||
|
|
||||||
// AvatarLink returns avatar link by given e-mail.
|
// AvatarLink returns avatar link by given e-mail.
|
||||||
func AvatarLink(email string) string {
|
func AvatarLink(email string) string {
|
||||||
if setting.DisableGravatar {
|
if setting.DisableGravatar || setting.OfflineMode {
|
||||||
return setting.AppSubUrl + "/img/avatar_default.jpg"
|
return setting.AppSubUrl + "/img/avatar_default.jpg"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user