Merge "DesktopArticleTarget.init: Improve handling of 'preloadparams'"

This commit is contained in:
jenkins-bot 2019-08-28 13:37:54 +00:00 committed by Gerrit Code Review
commit e7985003ab

View file

@ -350,7 +350,7 @@
targetName: 'mwTarget', targetName: 'mwTarget',
modified: modified, modified: modified,
preload: uri.query.preload, preload: uri.query.preload,
preloadparams: uri.query[ 'preloadparams[]' ], preloadparams: uri.query.preloadparams,
// If switching to visual with modifications, check if we have wikitext to convert // If switching to visual with modifications, check if we have wikitext to convert
wikitext: mode === 'visual' && modified ? $( '#wpTextbox1' ).textSelection( 'getContents' ) : undefined wikitext: mode === 'visual' && modified ? $( '#wpTextbox1' ).textSelection( 'getContents' ) : undefined
} ); } );
@ -480,7 +480,7 @@
conf = mw.config.get( 'wgVisualEditorConfig' ); conf = mw.config.get( 'wgVisualEditorConfig' );
tabMessages = conf.tabMessages; tabMessages = conf.tabMessages;
uri = new mw.Uri(); uri = new mw.Uri( null, { arrayParams: true } );
// T156998: Don't trust uri.query.oldid, it'll be wrong if uri.query.diff or uri.query.direction // 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'. // is set to 'next' or 'prev'.
oldId = mw.config.get( 'wgRevisionId' ) || $( 'input[name=parentRevId]' ).val(); oldId = mw.config.get( 'wgRevisionId' ) || $( 'input[name=parentRevId]' ).val();