From 65e09a303ea46bee59126e36dd2ebb03508a3fad Mon Sep 17 00:00:00 2001 From: "Panagiotis \"Ivory\" Vasilopoulos" Date: Fri, 29 Sep 2023 14:57:06 +0000 Subject: [PATCH] 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. --- routers/web/shared/user/header.go | 1 + routers/web/user/profile.go | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/shared/user/header.go b/routers/web/shared/user/header.go index 16d9321e80..2934f8206e 100644 --- a/routers/web/shared/user/header.go +++ b/routers/web/shared/user/header.go @@ -32,6 +32,7 @@ func PrepareContextForProfileBigAvatar(ctx *context.Context) { ctx.Data["IsFollowing"] = ctx.Doer != nil && user_model.IsFollowing(ctx, ctx.Doer.ID, ctx.ContextUser.ID) ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail && ctx.ContextUser.Email != "" && ctx.IsSigned && !ctx.ContextUser.KeepEmailPrivate + ctx.Data["UserLocationMapURL"] = setting.Service.UserLocationMapURL // Show OpenID URIs openIDs, err := user_model.GetUserOpenIDs(ctx, ctx.ContextUser.ID) diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go index f52ceb1a64..48a4b94c19 100644 --- a/routers/web/user/profile.go +++ b/routers/web/user/profile.go @@ -52,7 +52,6 @@ func userProfile(ctx *context.Context) { ctx.Data["Title"] = ctx.ContextUser.DisplayName() ctx.Data["PageIsUserProfile"] = true - ctx.Data["UserLocationMapURL"] = setting.Service.UserLocationMapURL // prepare heatmap data if setting.Service.EnableUserHeatmap {