summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-02-01 20:55:12 -0500
committerUnknwon <u@gogs.io>2016-02-01 20:55:12 -0500
commit1c74612b3c025282d4731880575922c797813ca7 (patch)
treeead1abc421a4939ff19db92f1a2a7c16e08eb4b6 /routers
parentd3ba2466932aa40b549a563c69c60905a30536b8 (diff)
downloadgitea-1c74612b3c025282d4731880575922c797813ca7.tar.gz
gitea-1c74612b3c025282d4731880575922c797813ca7.zip
Minor fix for #2444
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/issue.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index 3c1f62c207..57852a5ad3 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -595,10 +595,11 @@ func ViewIssue(ctx *middleware.Context) {
ok bool
marked = make(map[int64]models.CommentTag)
comment *models.Comment
- participants []*models.User
+ participants = make([]*models.User, 1, 10)
)
- participants = append(participants, issue.Poster)
- // Render comments. (and fetch participants)
+
+ // Render comments and and fetch participants.
+ participants[0] = issue.Poster
for _, comment = range issue.Comments {
if comment.Type == models.COMMENT_TYPE_COMMENT {
comment.RenderedContent = string(base.RenderMarkdown([]byte(comment.Content), ctx.Repo.RepoLink,
@@ -636,6 +637,7 @@ func ViewIssue(ctx *middleware.Context) {
}
ctx.Data["Participants"] = participants
+ ctx.Data["NumParticipants"] = len(participants)
ctx.Data["Issue"] = issue
ctx.Data["IsIssueOwner"] = ctx.Repo.IsAdmin() || (ctx.IsSigned && issue.IsPoster(ctx.User.Id))
ctx.Data["SignInLink"] = setting.AppSubUrl + "/user/login"