diff options
author | KN4CK3R <KN4CK3R@users.noreply.github.com> | 2021-04-30 19:25:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-30 19:25:13 +0200 |
commit | c80d7f33b67ad1beff7378bcba3aa44ac84669e9 (patch) | |
tree | c479207edb2a5fe0f03d6f5d25b256a244d0dbea /modules/context | |
parent | 1456978246c263acd6523534cf36b35f5ddbe0eb (diff) | |
download | gitea-c80d7f33b67ad1beff7378bcba3aa44ac84669e9.tar.gz gitea-c80d7f33b67ad1beff7378bcba3aa44ac84669e9.zip |
Unified link creation. (#15619)
Diffstat (limited to 'modules/context')
-rw-r--r-- | modules/context/org.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/context/org.go b/modules/context/org.go index 5148cc4a6c..527ccfbcaa 100644 --- a/modules/context/org.go +++ b/modules/context/org.go @@ -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. |