summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorJustin Nuß <nuss.justin@gmail.com>2014-07-23 21:24:24 +0200
committerJustin Nuß <nuss.justin@gmail.com>2014-07-23 21:24:24 +0200
commit34304e6a0c9a3904b999e3ae1fcc9e6518d3f026 (patch)
treeb5b225396138e7fd68bff0f4e8f5123e4e148883 /routers
parent4617bef8954deeef5bd2ba36d84aba3b05a4dd83 (diff)
downloadgitea-34304e6a0c9a3904b999e3ae1fcc9e6518d3f026.tar.gz
gitea-34304e6a0c9a3904b999e3ae1fcc9e6518d3f026.zip
WIP: Allow attachments for issues, not only comments
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/issue.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index 9a265e0959..abcf43a945 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -173,7 +173,10 @@ func CreateIssue(ctx *middleware.Context, params martini.Params) {
ctx.Handle(500, "issue.CreateIssue(GetCollaborators)", err)
return
}
+
+ ctx.Data["AllowedTypes"] = setting.AttachmentAllowedTypes
ctx.Data["Collaborators"] = us
+
ctx.HTML(200, ISSUE_CREATE)
}
@@ -1030,6 +1033,10 @@ func IssuePostAttachment(ctx *middleware.Context, params martini.Params) {
return
}
+ if commentId == 0 {
+ commentId = -1
+ }
+
file, header, err := ctx.Req.FormFile("attachment")
if err != nil {