File tree Expand file tree Collapse file tree 3 files changed +15
-10
lines changed Expand file tree Collapse file tree 3 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -1330,8 +1330,8 @@ issues.dependency.remove = Remove
1330
1330
issues.dependency.remove_info = Remove this dependency
1331
1331
issues.dependency.added_dependency = `added a new dependency %s`
1332
1332
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
1335
1335
issues.dependency.issue_close_blocks = This issue blocks closing of the following issues
1336
1336
issues.dependency.pr_close_blocks = This pull request blocks closing of the following issues
1337
1337
issues.dependency.issue_close_blocked = You need to close all issues blocking this issue before you can close it.
Original file line number Diff line number Diff line change @@ -2127,13 +2127,6 @@ func UpdateCommentContent(ctx *context.Context) {
2127
2127
return
2128
2128
}
2129
2129
2130
- if comment .Type == models .CommentTypeComment {
2131
- if err := comment .LoadAttachments (); err != nil {
2132
- ctx .ServerError ("LoadAttachments" , err )
2133
- return
2134
- }
2135
- }
2136
-
2137
2130
if ! ctx .IsSigned || (ctx .User .ID != comment .PosterID && ! ctx .Repo .CanWriteIssuesOrPulls (comment .Issue .IsPull )) {
2138
2131
ctx .Error (http .StatusForbidden )
2139
2132
return
@@ -2155,6 +2148,17 @@ func UpdateCommentContent(ctx *context.Context) {
2155
2148
return
2156
2149
}
2157
2150
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
+
2158
2162
if err := updateAttachments (comment , ctx .FormStrings ("files[]" )); err != nil {
2159
2163
ctx .ServerError ("UpdateAttachments" , err )
2160
2164
return
Original file line number Diff line number Diff line change @@ -46,9 +46,10 @@ export function initMarkupTasklist() {
46
46
const { updateUrl, context} = editContentZone . dataset ;
47
47
48
48
await $ . post ( updateUrl , {
49
+ ignore_attachments : true ,
49
50
_csrf : window . config . csrf ,
50
51
content : newContent ,
51
- context,
52
+ context
52
53
} ) ;
53
54
54
55
rawContent . textContent = newContent ;
You can’t perform that action at this time.
0 commit comments