DesktopArticleTarget: Set wgCurRevisionId and wgRevisionId once publish goes through

Bug: T370771
Change-Id: I0100c155352ec55275f40616f87e69af52d6e97b
This commit is contained in:
James D. Forrester 2024-07-25 12:27:53 -04:00
parent 3c14d837e0
commit 8c9605921c

View file

@ -840,8 +840,15 @@ ve.init.mw.DesktopArticleTarget.prototype.saveComplete = function ( data ) {
} );
}
// Actually fire the postEdit hook now that the save is complete
if ( data.newrevid !== undefined ) {
// (T370771) Update wgCurRevisionId and wgRevisionId (!)
// Mirror of DiscussionTools's cb5d585b93d83f9a7b4df10a71a0d574295f861c
mw.config.set( {
wgCurRevisionId: data.newrevid,
wgRevisionId: data.newrevid
} );
// Actually fire the postEdit hook, now that the save is complete
require( 'mediawiki.action.view.postEdit' ).fireHook( 'saved' );
}
}