From bb05ef907b0f19b57d03b035174dbd5fc97af406 Mon Sep 17 00:00:00 2001 From: Martin van Beurden Date: Sun, 28 Sep 2014 14:27:13 +0200 Subject: Fix AvatarLink when using a suburl and gravatar is disabled or avatars are cached --- models/user.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'models') diff --git a/models/user.go b/models/user.go index 8aa349c8a8..3e2ea82f43 100644 --- a/models/user.go +++ b/models/user.go @@ -97,9 +97,9 @@ func (u *User) HomeLink() string { // AvatarLink returns user gravatar link. func (u *User) AvatarLink() string { if setting.DisableGravatar { - return "/img/avatar_default.jpg" + return setting.AppSubUrl + "/img/avatar_default.jpg" } else if setting.Service.EnableCacheAvatar { - return "/avatar/" + u.Avatar + return setting.AppSubUrl + "/avatar/" + u.Avatar } return "//1.gravatar.com/avatar/" + u.Avatar } -- cgit v1.2.3