Merge "Don't call ApiBase::getResultData anymore, it's broken on core master and is deprecated anyway"

This commit is contained in:
jenkins-bot 2016-09-30 02:21:17 +00:00 committed by Gerrit Code Review
commit 9776be930a

View file

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