summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2015-02-06 20:47:21 -0500
committerUnknwon <joe2010xtmf@163.com>2015-02-06 20:47:21 -0500
commit5a99e9a37b1fa194675655e64d5f32ac6cf61729 (patch)
tree4ee490607e65c5dfca4fa7c7b5b8b59a461a838f /routers
parentafccd0a3eeb070100b375cd9bb83cd5b213d01b3 (diff)
downloadgitea-5a99e9a37b1fa194675655e64d5f32ac6cf61729.tar.gz
gitea-5a99e9a37b1fa194675655e64d5f32ac6cf61729.zip
models/action.go: add action reopen for #462
- models/issue.go: format comment type names
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/issue.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index 999fd0a892..3e0206dafb 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -424,7 +424,7 @@ func ViewIssue(ctx *middleware.Context) {
}
comments[i].Poster = u
- if comments[i].Type == models.COMMENT {
+ if comments[i].Type == models.COMMENT_TYPE_COMMENT {
comments[i].Content = string(base.RenderMarkdown([]byte(comments[i].Content), ctx.Repo.RepoLink))
}
}
@@ -774,9 +774,9 @@ func Comment(ctx *middleware.Context) {
}
}
- cmtType := models.CLOSE
+ cmtType := models.COMMENT_TYPE_CLOSE
if !issue.IsClosed {
- cmtType = models.REOPEN
+ cmtType = models.COMMENT_TYPE_REOPEN
}
if _, err = models.CreateComment(ctx.User.Id, ctx.Repo.Repository.Id, issue.Id, 0, 0, cmtType, "", nil); err != nil {
@@ -795,7 +795,7 @@ func Comment(ctx *middleware.Context) {
if len(content) > 0 || len(ctx.Req.MultipartForm.File["attachments"]) > 0 {
switch ctx.Params(":action") {
case "new":
- if comment, err = models.CreateComment(ctx.User.Id, ctx.Repo.Repository.Id, issue.Id, 0, 0, models.COMMENT, content, nil); err != nil {
+ if comment, err = models.CreateComment(ctx.User.Id, ctx.Repo.Repository.Id, issue.Id, 0, 0, models.COMMENT_TYPE_COMMENT, content, nil); err != nil {
send(500, nil, err)
return
}
@@ -1122,18 +1122,18 @@ func IssueGetAttachment(ctx *middleware.Context) {
// testing route handler for new issue ui page
// todo : move to Issue() function
-func Issues2(ctx *middleware.Context){
- ctx.HTML(200,"repo/issue2/list")
+func Issues2(ctx *middleware.Context) {
+ ctx.HTML(200, "repo/issue2/list")
}
-func PullRequest2(ctx *middleware.Context){
- ctx.HTML(200,"repo/pr2/list")
+func PullRequest2(ctx *middleware.Context) {
+ ctx.HTML(200, "repo/pr2/list")
}
-func Labels2(ctx *middleware.Context){
- ctx.HTML(200,"repo/issue2/labels")
+func Labels2(ctx *middleware.Context) {
+ ctx.HTML(200, "repo/issue2/labels")
}
-func Milestones2(ctx *middleware.Context){
- ctx.HTML(200,"repo/milestone2/list")
+func Milestones2(ctx *middleware.Context) {
+ ctx.HTML(200, "repo/milestone2/list")
}