summaryrefslogtreecommitdiffstats
path: root/routers/repo/issue.go
diff options
context:
space:
mode:
authorRémy Boulanouar <rboulanouar@gmail.com>2016-11-04 09:06:54 +0100
committerRémy Boulanouar <rboulanouar@gmail.com>2016-11-04 09:06:54 +0100
commit8dc49dc1149fccda2b4da63fa63d23f2b6260466 (patch)
tree826472b0f25062dd952359e395e48c960ccdf2df /routers/repo/issue.go
parent4a5faecd8f90b4849ab671051e832b3872818b0a (diff)
downloadgitea-8dc49dc1149fccda2b4da63fa63d23f2b6260466.tar.gz
gitea-8dc49dc1149fccda2b4da63fa63d23f2b6260466.zip
Implementation of the feature to redirect to an external issue tracker
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r--routers/repo/issue.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index f638b6f51f..8e8328c7e4 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -52,10 +52,15 @@ var (
)
func MustEnableIssues(ctx *context.Context) {
- if !ctx.Repo.Repository.EnableIssues || ctx.Repo.Repository.EnableExternalTracker {
+ if !ctx.Repo.Repository.EnableIssues {
ctx.Handle(404, "MustEnableIssues", nil)
return
}
+
+ if ctx.Repo.Repository.EnableExternalTracker {
+ ctx.Redirect(ctx.Repo.Repository.ExternalTrackerURL)
+ return
+ }
}
func MustAllowPulls(ctx *context.Context) {