1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-26 09:09:36 -05:00

Merge pull request #579 from TonyTsangHK/dev

Fix misuse of issue index for issue id.
This commit is contained in:
无闻 2014-10-22 08:44:33 -04:00
commit d7ea49b9f5

View file

@ -463,9 +463,9 @@ func UpdateIssue(ctx *middleware.Context, form auth.CreateIssueForm) {
} }
issue.Name = form.IssueName issue.Name = form.IssueName
issue.MilestoneId = form.MilestoneId //issue.MilestoneId = form.MilestoneId
issue.AssigneeId = form.AssigneeId //issue.AssigneeId = form.AssigneeId
issue.LabelIds = form.Labels //issue.LabelIds = form.Labels
issue.Content = form.Content issue.Content = form.Content
// try get content from text, ignore conflict with preview ajax // try get content from text, ignore conflict with preview ajax
if form.Content == "" { if form.Content == "" {
@ -565,7 +565,7 @@ func UpdateIssueMilestone(ctx *middleware.Context) {
return return
} }
issueId := com.StrTo(ctx.Params(":index")).MustInt64() issueId := com.StrTo(ctx.Query("issue")).MustInt64()
if issueId == 0 { if issueId == 0 {
ctx.Error(404) ctx.Error(404)
return return
@ -611,7 +611,7 @@ func UpdateAssignee(ctx *middleware.Context) {
return return
} }
issueId := com.StrTo(ctx.Params(":index")).MustInt64() issueId := com.StrTo(ctx.Query("issue")).MustInt64()
if issueId == 0 { if issueId == 0 {
ctx.Error(404) ctx.Error(404)
return return