diff options
Diffstat (limited to 'routers/routes/routes.go')
-rw-r--r-- | routers/routes/routes.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/routers/routes/routes.go b/routers/routes/routes.go index a51c1e17af..7f409eb576 100644 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -857,6 +857,8 @@ func RegisterRoutes(m *macaron.Macaron) { m.Get("/?:page", repo.Wiki) m.Get("/_pages", repo.WikiPages) m.Get("/:page/_revision", repo.WikiRevision) + m.Get("/commit/:sha([a-f0-9]{7,40})$", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.Diff) + m.Get("/commit/:sha([a-f0-9]{7,40})\\.:ext(patch|diff)", repo.RawDiff) m.Group("", func() { m.Combo("/_new").Get(repo.NewWiki). @@ -865,7 +867,9 @@ func RegisterRoutes(m *macaron.Macaron) { Post(bindIgnErr(auth.NewWikiForm{}), repo.EditWikiPost) m.Post("/:page/delete", repo.DeleteWikiPagePost) }, context.RepoMustNotBeArchived(), reqSignIn, reqRepoWikiWriter) - }, repo.MustEnableWiki, context.RepoRef()) + }, repo.MustEnableWiki, context.RepoRef(), func(ctx *context.Context) { + ctx.Data["PageIsWiki"] = true + }) m.Group("/wiki", func() { m.Get("/raw/*", repo.WikiRaw) |