summaryrefslogtreecommitdiffstats
path: root/routers/repo/issue.go
diff options
context:
space:
mode:
authorSandro Santilli <strk@kbt.io>2016-11-07 17:30:04 +0100
committerSandro Santilli <strk@kbt.io>2016-11-07 17:30:04 +0100
commit60c82a87805821ad6eaf5aeb58a3a266b56a30ff (patch)
treeddc3675e4133284dbe7fa1b2bbd10ed7d38ff6fc /routers/repo/issue.go
parentf6a11e0de1ab950b42679d6be9dc0f3ac86c3399 (diff)
downloadgitea-60c82a87805821ad6eaf5aeb58a3a266b56a30ff.tar.gz
gitea-60c82a87805821ad6eaf5aeb58a3a266b56a30ff.zip
More...
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r--routers/repo/issue.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index 9dff643ea4..d3a91c84cc 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -599,7 +599,7 @@ func ViewIssue(ctx *context.Context) {
// Render comments and and fetch participants.
participants[0] = issue.Poster
for _, comment = range issue.Comments {
- if comment.Type == models.COMMENT_TYPE_COMMENT {
+ if comment.Type == models.CommentTypeComment {
comment.RenderedContent = string(markdown.Render([]byte(comment.Content), ctx.Repo.RepoLink,
ctx.Repo.Repository.ComposeMetas()))
@@ -614,9 +614,9 @@ func ViewIssue(ctx *context.Context) {
(repo.Owner.IsOrganization() && repo.Owner.IsOwnedBy(comment.PosterID)) {
comment.ShowTag = models.COMMENT_TAG_OWNER
} else if comment.Poster.IsWriterOfRepo(repo) {
- comment.ShowTag = models.COMMENT_TAG_WRITER
+ comment.ShowTag = models.CommentTagWriter
} else if comment.PosterID == issue.PosterID {
- comment.ShowTag = models.COMMENT_TAG_POSTER
+ comment.ShowTag = models.CommentTagPoster
}
marked[comment.PosterID] = comment.ShowTag
@@ -892,7 +892,7 @@ func UpdateCommentContent(ctx *context.Context) {
if !ctx.IsSigned || (ctx.User.ID != comment.PosterID && !ctx.Repo.IsAdmin()) {
ctx.Error(403)
return
- } else if comment.Type != models.COMMENT_TYPE_COMMENT {
+ } else if comment.Type != models.CommentTypeComment {
ctx.Error(204)
return
}
@@ -924,7 +924,7 @@ func DeleteComment(ctx *context.Context) {
if !ctx.IsSigned || (ctx.User.ID != comment.PosterID && !ctx.Repo.IsAdmin()) {
ctx.Error(403)
return
- } else if comment.Type != models.COMMENT_TYPE_COMMENT {
+ } else if comment.Type != models.CommentTypeComment {
ctx.Error(204)
return
}