From ebbfdf7a1bdb06e8d86bf3c124eccb99fcd25a16 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Wed, 25 Apr 2018 22:01:49 +0200 Subject: [PATCH] Remove backward compatibility code for 1.25 Extension requires 1.29 in extension.json ApiResult::META_CONTENT exists since 1.25 Change-Id: Ibdbabf628975b277b2d3cc01e5b8ff12116fb97d --- includes/PageImages.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/includes/PageImages.php b/includes/PageImages.php index a73fec0..bcda076 100644 --- a/includes/PageImages.php +++ b/includes/PageImages.php @@ -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; }