Explorar el Código

Fix incorrect user location link on profile page (#29474)

Fix #29472. Regression of #29236, a "if" check was missing.
tags/v1.22.0-rc0
wxiaoguang hace 3 meses
padre
commit
10cfa0879a
No account linked to committer's email address
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3
    2
      routers/web/shared/user/header.go

+ 3
- 2
routers/web/shared/user/header.go Ver fichero

@@ -35,8 +35,9 @@ func PrepareContextForProfileBigAvatar(ctx *context.Context) {
prepareContextForCommonProfile(ctx)

ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail && ctx.ContextUser.Email != "" && ctx.IsSigned && !ctx.ContextUser.KeepEmailPrivate
ctx.Data["ContextUserLocationMapURL"] = setting.Service.UserLocationMapURL + url.QueryEscape(ctx.ContextUser.Location)

if setting.Service.UserLocationMapURL != "" {
ctx.Data["ContextUserLocationMapURL"] = setting.Service.UserLocationMapURL + url.QueryEscape(ctx.ContextUser.Location)
}
// Show OpenID URIs
openIDs, err := user_model.GetUserOpenIDs(ctx, ctx.ContextUser.ID)
if err != nil {

Cargando…
Cancelar
Guardar