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:
Brad Jorsch 2016-12-06 16:35:36 -05:00 committed by Roan Kattouw
parent bdfff4a3b1
commit 1bcdb0374a

View file

@ -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' );
}