Browse Source

Introduce fixes and more rigorous tests for 'Show on a map' feature (#26803) (#27365)

Backport #26803 by @n0toose

This change introduces some fixes for my original PR
(https://github.com/go-gitea/gitea/pull/26214) and introduces some
additional tests so that such a regression does not happen again in the
future.

Co-authored-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
tags/v1.21.0-rc1
Giteabot 8 months ago
parent
commit
de387102b4
No account linked to committer's email address
2 changed files with 1 additions and 1 deletions
  1. 1
    0
      routers/web/shared/user/header.go
  2. 0
    1
      routers/web/user/profile.go

+ 1
- 0
routers/web/shared/user/header.go View File

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

+ 0
- 1
routers/web/user/profile.go View File

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

Loading…
Cancel
Save