Skip to content

Commit 65e09a3

Browse files
authored
Introduce fixes and more rigorous tests for 'Show on a map' feature (#26803)
This change introduces a fix for the PR #26214 to set the UserLocationMapURL correctly.
1 parent c3b7231 commit 65e09a3

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

routers/web/shared/user/header.go

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ func PrepareContextForProfileBigAvatar(ctx *context.Context) {
3232

3333
ctx.Data["IsFollowing"] = ctx.Doer != nil && user_model.IsFollowing(ctx, ctx.Doer.ID, ctx.ContextUser.ID)
3434
ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail && ctx.ContextUser.Email != "" && ctx.IsSigned && !ctx.ContextUser.KeepEmailPrivate
35+
ctx.Data["UserLocationMapURL"] = setting.Service.UserLocationMapURL
3536

3637
// Show OpenID URIs
3738
openIDs, err := user_model.GetUserOpenIDs(ctx, ctx.ContextUser.ID)

routers/web/user/profile.go

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ func userProfile(ctx *context.Context) {
5252

5353
ctx.Data["Title"] = ctx.ContextUser.DisplayName()
5454
ctx.Data["PageIsUserProfile"] = true
55-
ctx.Data["UserLocationMapURL"] = setting.Service.UserLocationMapURL
5655

5756
// prepare heatmap data
5857
if setting.Service.EnableUserHeatmap {

0 commit comments

Comments
 (0)