Skip to content

Commit

Permalink
gogs#3577 incorrect URL produced by AvatarLink
Browse files Browse the repository at this point in the history
  • Loading branch information
unknwon committed Sep 1, 2016
1 parent b3d9ca4 commit c50d598
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion models/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/editor/commit_form.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="commit-form-wrapper">
<img width="48" height="48" class="ui image commit-avatar" src="{{.SignedUser.AvatarLink}}">
<img width="48" height="48" class="ui image commit-avatar" src="{{.SignedUser.RelAvatarLink}}">
<div class="commit-form">
<h3>{{.i18n.Tr "repo.editor.commit_changes"}}</h3>
<div class="field">
Expand Down

0 comments on commit c50d598

Please sign in to comment.