mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/PageImages
synced 2024-11-15 12:00:40 +00:00
Remove backward compatibility code for 1.25
Extension requires 1.29 in extension.json ApiResult::META_CONTENT exists since 1.25 Change-Id: Ibdbabf628975b277b2d3cc01e5b8ff12116fb97d
This commit is contained in:
parent
fd0d231a3c
commit
ebbfdf7a1b
|
@ -184,15 +184,9 @@ class PageImages {
|
|||
$api = new ApiMain( new FauxRequest( $request ) );
|
||||
$api->execute();
|
||||
|
||||
if ( defined( 'ApiResult::META_CONTENT' ) ) {
|
||||
$ret += (array)$api->getResult()->getResultData( [ 'query', 'pages' ],
|
||||
[ 'Strip' => 'base' ] );
|
||||
} else {
|
||||
$data = $api->getResultData();
|
||||
if ( isset( $data['query']['pages'] ) ) {
|
||||
$ret += $data['query']['pages'];
|
||||
}
|
||||
}
|
||||
$ret += (array)$api->getResult()->getResultData(
|
||||
[ 'query', 'pages' ], [ 'Strip' => 'base' ]
|
||||
);
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue