summaryrefslogtreecommitdiffstats
path: root/routers/repo/wiki.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-11 04:55:08 -0500
committerUnknwon <u@gogs.io>2015-12-11 04:55:08 -0500
commit40f3142264aa20103ba2c6375b344e491cff27f5 (patch)
tree2d17476fae2baf5e80aa56d596f83d37b141bcf7 /routers/repo/wiki.go
parentb21160a13aeab088bdee14ea5444321214adbd05 (diff)
downloadgitea-40f3142264aa20103ba2c6375b344e491cff27f5.tar.gz
gitea-40f3142264aa20103ba2c6375b344e491cff27f5.zip
#2114 External URL for wiki
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
}
}