Skip to content

Commit

Permalink
Fix incorrect user location link on profile page (#29474)
Browse files Browse the repository at this point in the history
Fix #29472. Regression of #29236, a "if" check was missing.
  • Loading branch information
wxiaoguang authored Feb 28, 2024
1 parent 1ad4bb9 commit 10cfa08
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions routers/web/shared/user/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 10cfa08

Please sign in to comment.