Anomie has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311783

Change subject: Remove pre-1.25 API compatibility code
......................................................................

Remove pre-1.25 API compatibility code

Since this extension uses extension.json, it already requires 1.25+ so
no need to keep the old code around.

Change-Id: Ia9215ac75f6473ae064b903665ba51eb73218378
---
M MoreLikePageSuggester.php
1 file changed, 1 insertion(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted 
refs/changes/83/311783/1

diff --git a/MoreLikePageSuggester.php b/MoreLikePageSuggester.php
index 354de90..1dcbc18 100644
--- a/MoreLikePageSuggester.php
+++ b/MoreLikePageSuggester.php
@@ -52,16 +52,7 @@
                );
                $searchApiCall->execute();
 
-               if ( defined( 'ApiResult::META_CONTENT' ) ) {
-                       $searchResults = 
(array)$searchApiCall->getResult()->getResultData( array( 'query', 'search' ), 
array( 'Strip' => 'base' ) );
-               } else {
-                       $apiResult = $searchApiCall->getResultData();
-                       if ( isset( $apiResult['query']['search'] ) && 
is_array( $apiResult['query']['search'] ) ) {
-                               $searchResults = $apiResult['query']['search'];
-                       } else {
-                               $searchResults = array();
-                       }
-               }
+               $searchResults = 
(array)$searchApiCall->getResult()->getResultData( array( 'query', 'search' ), 
array( 'Strip' => 'base' ) );
                $titles = array();
                foreach ( $searchResults as $searchResult ) {
                        $titles[] = Title::newFromText( $searchResult['title'] 
);

-- 
To view, visit https://gerrit.wikimedia.org/r/311783
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9215ac75f6473ae064b903665ba51eb73218378
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GettingStarted
Gerrit-Branch: master
Gerrit-Owner: Anomie <bjor...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to