From b73318bc62941b58064fca02b67d589718309155 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 8 Aug 2016 11:29:50 -0700 Subject: [PATCH] Fix 404 when comment on pulls and not using interal issue tracker --- cmd/web.go | 4 +++- gogs.go | 2 +- templates/.VERSION | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/web.go b/cmd/web.go index 1ce5acc783..5236ceec45 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -453,7 +453,6 @@ func runWeb(ctx *cli.Context) error { m.Combo("/new").Get(context.RepoRef(), repo.NewIssue). Post(bindIgnErr(auth.CreateIssueForm{}), repo.NewIssuePost) - m.Combo("/:index/comments").Post(bindIgnErr(auth.CreateCommentForm{}), repo.NewComment) m.Group("/:index", func() { m.Post("/label", repo.UpdateIssueLabel) m.Post("/milestone", repo.UpdateIssueMilestone) @@ -465,6 +464,9 @@ func runWeb(ctx *cli.Context) error { m.Post("/content", repo.UpdateIssueContent) }) }, repo.MustEnableIssues) + // FIXME: should use different URLs but mostly same logic for comments of issue and pull reuqest. + // So they can apply their own enable/disable logic on routers. + m.Combo("/issues/:index/comments").Post(bindIgnErr(auth.CreateCommentForm{}), repo.NewComment) m.Group("/comments/:id", func() { m.Post("", repo.UpdateCommentContent) m.Post("/delete", repo.DeleteComment) diff --git a/gogs.go b/gogs.go index 0e850eb2d7..b41bef32d7 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.9.67.0806" +const APP_VER = "0.9.67.0807" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/templates/.VERSION b/templates/.VERSION index a6c0a2d1e5..649c8e45f7 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.9.67.0806 \ No newline at end of file +0.9.67.0807 \ No newline at end of file