mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 02:26:22 +00:00 
			
		
		
		
	Make "Ghost" not link to 404 page (#6410)
* Make Ghost not link to 404 page * Make correct localization label show * Create and use GetLastEventLabelFake for when a Ghost user has made the action, thus not linking to a user profile * Add corresponding _fake entries to locale_en-US * Make Ghost avatar not link to 404 page * Make Ghost on milestone_issues not link to 404 page
This commit is contained in:
		
				
					committed by
					
						
						techknowlogick
					
				
			
			
				
	
			
			
			
						parent
						
							ee0d3eeadc
						
					
				
				
					commit
					2019983e77
				
			@@ -990,6 +990,17 @@ func (issue *Issue) GetLastEventLabel() string {
 | 
			
		||||
	return "repo.issues.opened_by"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetLastEventLabelFake returns the localization label for the current issue without providing a link in the username.
 | 
			
		||||
func (issue *Issue) GetLastEventLabelFake() string {
 | 
			
		||||
	if issue.IsClosed {
 | 
			
		||||
		if issue.IsPull && issue.PullRequest.HasMerged {
 | 
			
		||||
			return "repo.pulls.merged_by_fake"
 | 
			
		||||
		}
 | 
			
		||||
		return "repo.issues.closed_by_fake"
 | 
			
		||||
	}
 | 
			
		||||
	return "repo.issues.opened_by_fake"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NewIssueOptions represents the options of a new issue.
 | 
			
		||||
type NewIssueOptions struct {
 | 
			
		||||
	Repo        *Repository
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user