#3577 incorrect URL produced by AvatarLink

release/v1.15
Unknwon 2016-09-01 12:36:26 -04:00
parent b3d9ca4ccd
commit c50d59874d
No known key found for this signature in database
GPG Key ID: FB9F411CDD69BEC1
2 changed files with 2 additions and 2 deletions

View File

@ -271,7 +271,7 @@ func (u *User) RelAvatarLink() string {
func (u *User) AvatarLink() string { func (u *User) AvatarLink() string {
link := u.RelAvatarLink() link := u.RelAvatarLink()
if link[0] == '/' && link[1] != '/' { if link[0] == '/' && link[1] != '/' {
return setting.AppUrl + link[1:] return setting.AppUrl + strings.TrimPrefix(link, setting.AppSubUrl)[1:]
} }
return link return link
} }

View File

@ -1,5 +1,5 @@
<div class="commit-form-wrapper"> <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"> <div class="commit-form">
<h3>{{.i18n.Tr "repo.editor.commit_changes"}}</h3> <h3>{{.i18n.Tr "repo.editor.commit_changes"}}</h3>
<div class="field"> <div class="field">