Anomie has uploaded a new change for review.

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

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: I1cce52d8f7fea0df36037825d7020d4ef1acb204
---
M ApiQueryGlobalUsage.php
1 file changed, 6 insertions(+), 50 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalUsage 
refs/changes/85/311785/1

diff --git a/ApiQueryGlobalUsage.php b/ApiQueryGlobalUsage.php
index 60032ec..15bf8a5 100644
--- a/ApiQueryGlobalUsage.php
+++ b/ApiQueryGlobalUsage.php
@@ -99,20 +99,11 @@
        private function setIndexedTagName() {
                $result = $this->getResult();
                $pageIds = $this->getPageSet()->getAllTitlesByNamespace();
-               if ( defined( 'ApiResult::META_CONTENT' ) ) {
-                       foreach ( $pageIds[NS_FILE] as $id ) {
-                               $result->addIndexedTagName(
-                                       array( 'query', 'pages', $id, 
'globalusage' ),
-                                       'gu'
-                               );
-                       }
-               } else {
-                       foreach ( $pageIds[NS_FILE] as $id ) {
-                               $result->setIndexedTagName_internal(
-                                       array( 'query', 'pages', $id, 
'globalusage' ),
-                                       'gu'
-                               );
-                       }
+               foreach ( $pageIds[NS_FILE] as $id ) {
+                       $result->addIndexedTagName(
+                               array( 'query', 'pages', $id, 'globalusage' ),
+                               'gu'
+                       );
                }
        }
 
@@ -135,44 +126,9 @@
                                ApiBase :: PARAM_MAX2 => ApiBase :: LIMIT_BIG2
                        ),
                        'continue' => array(
-                               /** @todo Once support for MediaWiki < 1.25 is 
dropped, just use ApiBase::PARAM_HELP_MSG directly */
-                               constant( 'ApiBase::PARAM_HELP_MSG' ) ?: '' => 
'api-help-param-continue',
+                               ApiBase::PARAM_HELP_MSG => 
'api-help-param-continue',
                        ),
                        'filterlocal' => false,
-               );
-       }
-
-       /**
-        * @deprecated since MediaWiki core 1.25
-        */
-       public function getParamDescription() {
-               return array(
-                       'prop' => array(
-                               'What properties to return',
-                               ' url        - Adds url ',
-                               ' pageid     - Adds page id',
-                               ' namespace  - Adds namespace id',
-                       ),
-                       'limit' => 'How many links to return',
-                       'continue' => 'When more results are available, use 
this to continue',
-                       'filterlocal' => 'Filter local usage of the file',
-               );
-       }
-
-       /**
-        * @deprecated since MediaWiki core 1.25
-        */
-       public function getDescription() {
-               return 'Returns global image usage for a certain image';
-       }
-
-       /**
-        * @deprecated since MediaWiki core 1.25
-        */
-       public function getExamples() {
-               return array(
-                       "Get usage of File:Example.jpg:",
-                       "  
api.php?action=query&prop=globalusage&titles=File:Example.jpg",
                );
        }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1cce52d8f7fea0df36037825d7020d4ef1acb204
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalUsage
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