mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-09-24 10:58:20 +00:00
Merge "Restore error message for when comment is deleted while replying"
This commit is contained in:
commit
3e813316b0
|
@ -303,6 +303,13 @@ CommentController.prototype.save = function ( comment, pageName ) {
|
|||
if ( code === 'editconflict' ) {
|
||||
return commentController.save( comment, pageName );
|
||||
}
|
||||
// Better user-facing error message
|
||||
if ( code === 'discussiontools-commentid-notfound' ) {
|
||||
return $.Deferred().reject( 'discussiontools-commentid-notfound', { errors: [ {
|
||||
code: 'discussiontools-commentid-notfound',
|
||||
html: mw.message( 'discussiontools-error-comment-disappeared' ).parse()
|
||||
} ] } ).promise();
|
||||
}
|
||||
return $.Deferred().reject( code, data ).promise();
|
||||
} );
|
||||
savePromise.then( function () {
|
||||
|
|
|
@ -121,14 +121,6 @@ function checkCommentOnPage( pageName, oldId, commentId ) {
|
|||
lintErrors = response.linterrors,
|
||||
transcludedFrom = response.transcludedfrom;
|
||||
|
||||
// We no longer check if the comment exists on the page, is this an issue?
|
||||
// if ( !comment ) {
|
||||
// return $.Deferred().reject( 'comment-disappeared', { errors: [ {
|
||||
// code: 'comment-disappeared',
|
||||
// html: mw.message( 'discussiontools-error-comment-disappeared' ).parse()
|
||||
// } ] } ).promise();
|
||||
// }
|
||||
|
||||
isTranscludedFrom = transcludedFrom[ commentId ];
|
||||
if ( isTranscludedFrom ) {
|
||||
mwTitle = isTranscludedFrom === true ? null : mw.Title.newFromText( isTranscludedFrom );
|
||||
|
|
Loading…
Reference in a new issue