0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-26 13:52:48 +01: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.MilestoneId = form.MilestoneId
issue.AssigneeId = form.AssigneeId
issue.LabelIds = form.Labels
//issue.MilestoneId = form.MilestoneId
//issue.AssigneeId = form.AssigneeId
//issue.LabelIds = form.Labels
issue.Content = form.Content
// try get content from text, ignore conflict with preview ajax
if form.Content == "" {
@ -565,7 +565,7 @@ func UpdateIssueMilestone(ctx *middleware.Context) {
return
}
issueId := com.StrTo(ctx.Params(":index")).MustInt64()
issueId := com.StrTo(ctx.Query("issue")).MustInt64()
if issueId == 0 {
ctx.Error(404)
return
@ -611,7 +611,7 @@ func UpdateAssignee(ctx *middleware.Context) {
return
}
issueId := com.StrTo(ctx.Params(":index")).MustInt64()
issueId := com.StrTo(ctx.Query("issue")).MustInt64()
if issueId == 0 {
ctx.Error(404)
return