mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 14:33:59 +00:00
Merge "Don't call ApiBase::getResultData anymore, it's broken on core master and is deprecated anyway"
This commit is contained in:
commit
9776be930a
|
@ -351,9 +351,10 @@ class ApiVisualEditor extends ApiBase {
|
|||
true // enable write?
|
||||
);
|
||||
$api->execute();
|
||||
$result = $api->getResultData();
|
||||
$content = isset( $result['query']['pages'][$title->getArticleID()]['revisions'][0]['*'] ) ?
|
||||
$result['query']['pages'][$title->getArticleID()]['revisions'][0]['*'] :
|
||||
$result = $api->getResult()->getResultData();
|
||||
$pid = $title->getArticleID();
|
||||
$content = isset( $result['query']['pages'][$pid]['revisions']['0']['content'] ) ?
|
||||
$result['query']['pages'][$pid]['revisions']['0']['content'] :
|
||||
false;
|
||||
if ( $content === false ) {
|
||||
$this->dieUsage( 'Error contacting the document server', 'docserver' );
|
||||
|
|
Loading…
Reference in a new issue