mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Unified link creation. (#15619)
This commit is contained in:
		@@ -9,7 +9,6 @@ import (
 | 
			
		||||
	"strings"
 | 
			
		||||
 | 
			
		||||
	"code.gitea.io/gitea/models"
 | 
			
		||||
	"code.gitea.io/gitea/modules/setting"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Organization contains organization context
 | 
			
		||||
@@ -70,7 +69,7 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
 | 
			
		||||
 | 
			
		||||
	// Force redirection when username is actually a user.
 | 
			
		||||
	if !org.IsOrganization() {
 | 
			
		||||
		ctx.Redirect(setting.AppSubURL + "/" + org.Name)
 | 
			
		||||
		ctx.Redirect(org.HomeLink())
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -118,7 +117,7 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
 | 
			
		||||
	ctx.Data["IsOrganizationMember"] = ctx.Org.IsMember
 | 
			
		||||
	ctx.Data["CanCreateOrgRepo"] = ctx.Org.CanCreateOrgRepo
 | 
			
		||||
 | 
			
		||||
	ctx.Org.OrgLink = setting.AppSubURL + "/org/" + org.Name
 | 
			
		||||
	ctx.Org.OrgLink = org.OrganisationLink()
 | 
			
		||||
	ctx.Data["OrgLink"] = ctx.Org.OrgLink
 | 
			
		||||
 | 
			
		||||
	// Team.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user