mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
ApiVisualEditorEdit: ApiParse ignores 'page' when 'oldid' is supplied
And since Iae0e2ce3 supplying both is an error. Bug: T152547 Change-Id: Ib1b35c886bbebfe8505c52a944a8252d8174c979
This commit is contained in:
parent
bdfff4a3b1
commit
1bcdb0374a
|
@ -58,10 +58,9 @@ class ApiVisualEditorEdit extends ApiVisualEditor {
|
|||
return $api->getResult()->getResultData();
|
||||
}
|
||||
|
||||
protected function parseWikitext( $title, $newRevId ) {
|
||||
protected function parseWikitext( $newRevId ) {
|
||||
$apiParams = [
|
||||
'action' => 'parse',
|
||||
'page' => $title->getPrefixedDBkey(),
|
||||
'oldid' => $newRevId,
|
||||
'prop' => 'text|revid|categorieshtml|displaytitle|modules|jsconfigvars',
|
||||
];
|
||||
|
@ -318,7 +317,7 @@ class ApiVisualEditorEdit extends ApiVisualEditor {
|
|||
|
||||
// Return result of parseWikitext instead of saveWikitext so that the
|
||||
// frontend can update the page rendering without a refresh.
|
||||
$result = $this->parseWikitext( $title, $newRevId );
|
||||
$result = $this->parseWikitext( $newRevId );
|
||||
if ( $result === false ) {
|
||||
$this->dieWithError( 'apierror-visualeditor-docserver', 'docserver' );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue