|
|
@ -1727,10 +1727,13 @@ func UpdateIssueContent(ctx *context.Context) { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// when update the request doesn't intend to update attachments (eg: change checkbox state), ignore attachment updates
|
|
|
|
|
|
|
|
if !ctx.FormBool("ignore_attachments") { |
|
|
|
if err := updateAttachments(issue, ctx.FormStrings("files[]")); err != nil { |
|
|
|
if err := updateAttachments(issue, ctx.FormStrings("files[]")); err != nil { |
|
|
|
ctx.ServerError("UpdateAttachments", err) |
|
|
|
ctx.ServerError("UpdateAttachments", err) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
content, err := markdown.RenderString(&markup.RenderContext{ |
|
|
|
content, err := markdown.RenderString(&markup.RenderContext{ |
|
|
|
URLPrefix: ctx.FormString("context"), |
|
|
|
URLPrefix: ctx.FormString("context"), |
|
|
@ -2148,10 +2151,6 @@ func UpdateCommentContent(ctx *context.Context) { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ctx.FormBool("ignore_attachments") { |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if comment.Type == models.CommentTypeComment { |
|
|
|
if comment.Type == models.CommentTypeComment { |
|
|
|
if err := comment.LoadAttachments(); err != nil { |
|
|
|
if err := comment.LoadAttachments(); err != nil { |
|
|
|
ctx.ServerError("LoadAttachments", err) |
|
|
|
ctx.ServerError("LoadAttachments", err) |
|
|
@ -2159,10 +2158,13 @@ func UpdateCommentContent(ctx *context.Context) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// when the update request doesn't intend to update attachments (eg: change checkbox state), ignore attachment updates
|
|
|
|
|
|
|
|
if !ctx.FormBool("ignore_attachments") { |
|
|
|
if err := updateAttachments(comment, ctx.FormStrings("files[]")); err != nil { |
|
|
|
if err := updateAttachments(comment, ctx.FormStrings("files[]")); err != nil { |
|
|
|
ctx.ServerError("UpdateAttachments", err) |
|
|
|
ctx.ServerError("UpdateAttachments", err) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
content, err := markdown.RenderString(&markup.RenderContext{ |
|
|
|
content, err := markdown.RenderString(&markup.RenderContext{ |
|
|
|
URLPrefix: ctx.FormString("context"), |
|
|
|
URLPrefix: ctx.FormString("context"), |
|
|
|