summaryrefslogtreecommitdiffstats
path: root/routers/repo/wiki.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/wiki.go')
-rw-r--r--routers/repo/wiki.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/routers/repo/wiki.go b/routers/repo/wiki.go
index 6b3f2e3413..77aa1c370a 100644
--- a/routers/repo/wiki.go
+++ b/routers/repo/wiki.go
@@ -27,6 +27,12 @@ const (
func MustEnableWiki(ctx *middleware.Context) {
if !ctx.Repo.Repository.EnableWiki {
ctx.Handle(404, "MustEnableWiki", nil)
+ return
+ }
+
+ if ctx.Repo.Repository.EnableExternalWiki {
+ ctx.Redirect(ctx.Repo.Repository.ExternalWikiURL)
+ return
}
}