Explorar el Código

#3577 incorrect URL produced by AvatarLink

tags/v0.9.99
Unknwon hace 7 años
padre
commit
c50d59874d
No account linked to committer's email address
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1
    1
      models/user.go
  2. 1
    1
      templates/repo/editor/commit_form.tmpl

+ 1
- 1
models/user.go Ver fichero

@@ -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
}

+ 1
- 1
templates/repo/editor/commit_form.tmpl Ver fichero

@@ -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">

Cargando…
Cancelar
Guardar