Skip to content

Commit cc2b851

Browse files
authored
Merge branch 'main' into fix-regression-in-16544-openidconnect
2 parents 28499e4 + 3ecc4a1 commit cc2b851

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

options/locale/locale_en-US.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,8 +1330,8 @@ issues.dependency.remove = Remove
13301330
issues.dependency.remove_info = Remove this dependency
13311331
issues.dependency.added_dependency = `added a new dependency %s`
13321332
issues.dependency.removed_dependency = `removed a dependency %s`
1333-
issues.dependency.issue_closing_blockedby = Closing this pull request is blocked by the following issues
1334-
issues.dependency.pr_closing_blockedby = Closing this issue is blocked by the following issues
1333+
issues.dependency.pr_closing_blockedby = Closing this pull request is blocked by the following issues
1334+
issues.dependency.issue_closing_blockedby = Closing this issue is blocked by the following issues
13351335
issues.dependency.issue_close_blocks = This issue blocks closing of the following issues
13361336
issues.dependency.pr_close_blocks = This pull request blocks closing of the following issues
13371337
issues.dependency.issue_close_blocked = You need to close all issues blocking this issue before you can close it.

routers/web/repo/issue.go

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2127,13 +2127,6 @@ func UpdateCommentContent(ctx *context.Context) {
21272127
return
21282128
}
21292129

2130-
if comment.Type == models.CommentTypeComment {
2131-
if err := comment.LoadAttachments(); err != nil {
2132-
ctx.ServerError("LoadAttachments", err)
2133-
return
2134-
}
2135-
}
2136-
21372130
if !ctx.IsSigned || (ctx.User.ID != comment.PosterID && !ctx.Repo.CanWriteIssuesOrPulls(comment.Issue.IsPull)) {
21382131
ctx.Error(http.StatusForbidden)
21392132
return
@@ -2155,6 +2148,17 @@ func UpdateCommentContent(ctx *context.Context) {
21552148
return
21562149
}
21572150

2151+
if ctx.FormBool("ignore_attachments") {
2152+
return
2153+
}
2154+
2155+
if comment.Type == models.CommentTypeComment {
2156+
if err := comment.LoadAttachments(); err != nil {
2157+
ctx.ServerError("LoadAttachments", err)
2158+
return
2159+
}
2160+
}
2161+
21582162
if err := updateAttachments(comment, ctx.FormStrings("files[]")); err != nil {
21592163
ctx.ServerError("UpdateAttachments", err)
21602164
return

web_src/js/markup/tasklist.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ export function initMarkupTasklist() {
4646
const {updateUrl, context} = editContentZone.dataset;
4747

4848
await $.post(updateUrl, {
49+
ignore_attachments: true,
4950
_csrf: window.config.csrf,
5051
content: newContent,
51-
context,
52+
context
5253
});
5354

5455
rawContent.textContent = newContent;

0 commit comments

Comments
 (0)