mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	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.
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							c3b7231966
						
					
				
				
					commit
					65e09a303e
				
			@@ -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["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["ShowUserEmail"] = setting.UI.ShowUserEmail && ctx.ContextUser.Email != "" && ctx.IsSigned && !ctx.ContextUser.KeepEmailPrivate
 | 
				
			||||||
 | 
						ctx.Data["UserLocationMapURL"] = setting.Service.UserLocationMapURL
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Show OpenID URIs
 | 
						// Show OpenID URIs
 | 
				
			||||||
	openIDs, err := user_model.GetUserOpenIDs(ctx, ctx.ContextUser.ID)
 | 
						openIDs, err := user_model.GetUserOpenIDs(ctx, ctx.ContextUser.ID)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -52,7 +52,6 @@ func userProfile(ctx *context.Context) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	ctx.Data["Title"] = ctx.ContextUser.DisplayName()
 | 
						ctx.Data["Title"] = ctx.ContextUser.DisplayName()
 | 
				
			||||||
	ctx.Data["PageIsUserProfile"] = true
 | 
						ctx.Data["PageIsUserProfile"] = true
 | 
				
			||||||
	ctx.Data["UserLocationMapURL"] = setting.Service.UserLocationMapURL
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// prepare heatmap data
 | 
						// prepare heatmap data
 | 
				
			||||||
	if setting.Service.EnableUserHeatmap {
 | 
						if setting.Service.EnableUserHeatmap {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user