mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-26 19:56:49 +00:00
Api: Missing preloadparams
* Tiny fix to 33dc60838c
for PHP variable name
* Bigger fix to properly pass preloadparams in and split them up
Change-Id: I844db115f2563cb9ee1629c30d5f49d1ce58f5bd
This commit is contained in:
parent
69092c4b6c
commit
02c6e9142b
|
@ -162,7 +162,7 @@ class ApiVisualEditor extends ApiBase {
|
|||
$content = $content->preloadTransform(
|
||||
$preloadTitle,
|
||||
$parserOptions,
|
||||
$params['preloadparams']
|
||||
(array)$params
|
||||
)->serialize();
|
||||
|
||||
if ( $parse ) {
|
||||
|
@ -716,7 +716,9 @@ class ApiVisualEditor extends ApiBase {
|
|||
'editintro' => null,
|
||||
'pst' => false,
|
||||
'preload' => null,
|
||||
'preloadparams' => null,
|
||||
'preloadparams' => [
|
||||
ApiBase::PARAM_ISMULTI => true,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -252,7 +252,7 @@
|
|||
targetName: 'article', // ve.init.mw.DesktopArticleTarget.static.name
|
||||
modified: modified,
|
||||
preload: uri.query.preload,
|
||||
preloadparams: uri.query.preloadparams,
|
||||
preloadparams: uri.query[ 'preloadparams[]' ],
|
||||
// If switching to visual, check if we have wikitext to convert
|
||||
wikitext: mode === 'visual' ? $( '#wpTextbox1' ).textSelection( 'getContents' ) : undefined
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue