From c50d59874d88150081f5fec6b385cfdf4eb3ed84 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 1 Sep 2016 12:36:26 -0400 Subject: [PATCH] #3577 incorrect URL produced by AvatarLink --- models/user.go | 2 +- templates/repo/editor/commit_form.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/user.go b/models/user.go index ef769de65..946c6c94d 100644 --- a/models/user.go +++ b/models/user.go @@ -271,7 +271,7 @@ func (u *User) RelAvatarLink() string { func (u *User) AvatarLink() string { link := u.RelAvatarLink() if link[0] == '/' && link[1] != '/' { - return setting.AppUrl + link[1:] + return setting.AppUrl + strings.TrimPrefix(link, setting.AppSubUrl)[1:] } return link } diff --git a/templates/repo/editor/commit_form.tmpl b/templates/repo/editor/commit_form.tmpl index d76f3fb1c..96b0dcbd3 100644 --- a/templates/repo/editor/commit_form.tmpl +++ b/templates/repo/editor/commit_form.tmpl @@ -1,5 +1,5 @@
- +

{{.i18n.Tr "repo.editor.commit_changes"}}