Merge "ve.init.mw.DesktopArticleTarget.init: Edit the latest revision when viewing a FlaggedRevs-stable one"

This commit is contained in:
jenkins-bot 2018-05-05 01:03:04 +00:00 committed by Gerrit Code Review
commit 1f6cf4883d

View file

@ -488,7 +488,10 @@
// T156998: Don't trust uri.query.oldid, it'll be wrong if uri.query.diff or uri.query.direction
// is set to 'next' or 'prev'.
oldId = mw.config.get( 'wgRevisionId' ) || $( 'input[name=parentRevId]' ).val();
if ( oldId === mw.config.get( 'wgCurRevisionId' ) ) {
// wgFlaggedRevsEditLatestRevision is set by FlaggedRevs extension when viewing a stable revision
if ( oldId === mw.config.get( 'wgCurRevisionId' ) || mw.config.get( 'wgFlaggedRevsEditLatestRevision' ) ) {
// The page may have been edited by someone else after we loaded it, setting this to "undefined"
// indicates that we should load the actual latest revision.
oldId = undefined;
}
pageExists = !!mw.config.get( 'wgRelevantArticleId' );