mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
DesktopArticleTarget: Set wgCurRevisionId and wgRevisionId once publish goes through
Bug: T370771 Change-Id: I0100c155352ec55275f40616f87e69af52d6e97b
This commit is contained in:
parent
3c14d837e0
commit
8c9605921c
|
@ -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' );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue