diff options
author | Unknwon <u@gogs.io> | 2015-12-11 04:55:08 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-12-11 04:55:08 -0500 |
commit | 40f3142264aa20103ba2c6375b344e491cff27f5 (patch) | |
tree | 2d17476fae2baf5e80aa56d596f83d37b141bcf7 /routers/repo/wiki.go | |
parent | b21160a13aeab088bdee14ea5444321214adbd05 (diff) | |
download | gitea-40f3142264aa20103ba2c6375b344e491cff27f5.tar.gz gitea-40f3142264aa20103ba2c6375b344e491cff27f5.zip |
#2114 External URL for wiki
Diffstat (limited to 'routers/repo/wiki.go')
-rw-r--r-- | routers/repo/wiki.go | 6 |
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 } } |