Anomie has uploaded a new change for review.

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

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: Id4182773b2b5c5bb8149a8a70c76c604a314253f
---
M ApiFeedbackDashboard.php
M ApiFeedbackDashboardResponse.php
M ApiMoodBar.php
M ApiMoodBarSetUserEmail.php
M ApiQueryMoodBarComments.php
5 files changed, 4 insertions(+), 139 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MoodBar 
refs/changes/90/311790/1

diff --git a/ApiFeedbackDashboard.php b/ApiFeedbackDashboard.php
index 12fad10..80f90b8 100644
--- a/ApiFeedbackDashboard.php
+++ b/ApiFeedbackDashboard.php
@@ -44,10 +44,6 @@
                return 'csrf';
        }
 
-       public function getTokenSalt() {
-               return '';
-       }
-
        public function getAllowedParams() {
                return array(
                        'mbaction' => array(
@@ -80,23 +76,5 @@
 
        public function isWriteMode() {
                return true;
-       }
-
-       /**
-        * @deprecated since MediaWiki core 1.25
-        */
-       public function getParamDescription() {
-               return array(
-                       'mbaction' => 'The action to take',
-                       'item' => 'The feedback item to apply it to',
-                       'reason' => 'The reason to specify in the log',
-               );
-       }
-
-       /**
-        * @deprecated since MediaWiki core 1.25
-        */
-       public function getDescription() {
-               return 'Allows administrators to manage submissions to the 
feedback dashboard';
        }
 }
diff --git a/ApiFeedbackDashboardResponse.php b/ApiFeedbackDashboardResponse.php
index 5caecec..0c8e537 100644
--- a/ApiFeedbackDashboardResponse.php
+++ b/ApiFeedbackDashboardResponse.php
@@ -129,10 +129,6 @@
                return 'csrf';
        }
 
-       public function getTokenSalt() {
-               return '';
-       }
-
        public function getAllowedParams() {
                return array(
                        'feedback' => array(
@@ -161,28 +157,5 @@
 
        public function isWriteMode() {
                return true;
-       }
-
-       /**
-        * @deprecated since MediaWiki core 1.25
-        */
-       public function getParamDescription() {
-               return array(
-                       'feedback' => 'The moodbar feedback unique identifier',
-                       'response' => 'The feedback text',
-                       'anonymize' => 'Whether to hide user information',
-                       'editmode' => 'Whether or not the feedback context is 
in edit mode',
-                       'useragent' => 'The User-Agent header of the browser',
-                       'system' => 'The operating system being used',
-                       'locale' => 'The locale in use',
-                       'token' => 'An edit token',
-               );
-       }
-
-       /**
-        * @deprecated since MediaWiki core 1.25
-        */
-       public function getDescription() {
-               return 'Allows users to submit response to a feedback about 
their experiences on the site';
        }
 }
diff --git a/ApiMoodBar.php b/ApiMoodBar.php
index 3d2f73e..bde9864 100644
--- a/ApiMoodBar.php
+++ b/ApiMoodBar.php
@@ -57,10 +57,6 @@
                return 'csrf';
        }
 
-       public function getTokenSalt() {
-               return '';
-       }
-
        public function getAllowedParams() {
                return array(
                        'page' => array(
@@ -93,30 +89,5 @@
 
        public function isWriteMode() {
                return true;
-       }
-
-       /**
-        * @deprecated since MediaWiki core 1.25
-        */
-       public function getParamDescription() {
-               return array(
-                       'page' => 'The page the feedback is on',
-                       'type' => 'The type of feedback being provided',
-                       'comment' => 'The feedback text',
-                       'anonymize' => 'Whether to hide user information',
-                       'editmode' => 'Whether or not the feedback context is 
in edit mode',
-                       'bucket' => 'The testing bucket, if any',
-                       'useragent' => 'The User-Agent header of the browser',
-                       'system' => 'The operating system being used',
-                       'locale' => 'The locale in use',
-                       'token' => 'An edit token',
-               );
-       }
-
-       /**
-        * @deprecated since MediaWiki core 1.25
-        */
-       public function getDescription() {
-               return 'Allows users to submit feedback about their experiences 
on the site';
        }
 }
diff --git a/ApiMoodBarSetUserEmail.php b/ApiMoodBarSetUserEmail.php
index 3dafcb5..4cbd4c8 100644
--- a/ApiMoodBarSetUserEmail.php
+++ b/ApiMoodBarSetUserEmail.php
@@ -109,10 +109,6 @@
                return 'csrf';
        }
 
-       public function getTokenSalt() {
-               return '';
-       }
-
        public function getAllowedParams() {
                return array(
                        'mbaction' => array(
@@ -139,23 +135,6 @@
 
        public function isWriteMode() {
                return true;
-       }
-
-       /**
-        * @deprecated since MediaWiki core 1.25
-        */
-       public function getParamDescription() {
-               return array(
-                       'mbaction' => 'The action to take',
-                       'email' => 'the email which a user sets or resends 
verification to'
-               );
-       }
-
-       /**
-        * @deprecated since MediaWiki core 1.25
-        */
-       public function getDescription() {
-               return 'Sets the profile email for a user or resends the 
verification email to a user';
        }
 }
 
diff --git a/ApiQueryMoodBarComments.php b/ApiQueryMoodBarComments.php
index 86f0711..bebbc48 100644
--- a/ApiQueryMoodBarComments.php
+++ b/ApiQueryMoodBarComments.php
@@ -74,11 +74,7 @@
                                break;
                        }
                }
-               if ( defined( 'ApiResult::META_CONTENT' ) ) {
-                       $result->addIndexedTagName( array( 'query', 
$this->getModuleName() ), 'comment' );
-               } else {
-                       $result->setIndexedTagName_internal( array( 'query', 
$this->getModuleName() ), 'comment' );
-               }
+               $result->addIndexedTagName( array( 'query', 
$this->getModuleName() ), 'comment' );
        }
 
        protected function getContinue( $row ) {
@@ -141,11 +137,7 @@
                }
 
                if ( isset( $content ) ) {
-                       if ( defined( 'ApiResult::META_CONTENT' ) ) {
-                               ApiResult::setContentValue( $r, 'content', 
$content );
-                       } else {
-                               ApiResult::setContent( $r, $content );
-                       }
+                       ApiResult::setContentValue( $r, 'content', $content );
                }
 
                return $r;
@@ -166,12 +158,10 @@
                                        'newer',
                                        'older'
                                ),
-                               /** @todo Once support for MediaWiki < 1.25 is 
dropped, just use ApiBase::PARAM_HELP_MSG directly */
-                               constant( 'ApiBase::PARAM_HELP_MSG' ) ?: '' => 
'api-help-param-direction',
+                               ApiBase::PARAM_HELP_MSG => 
'api-help-param-direction',
                        ),
                        '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',
                        ),
                        'type' => array(
                                ApiBase::PARAM_TYPE => 
MBFeedbackItem::getValidTypes(),
@@ -189,32 +179,6 @@
                                ApiBase::PARAM_ISMULTI => true,
                        ),
                );
-       }
-
-       /**
-        * @deprecated since MediaWiki core 1.25
-        */
-       public function getParamDescription() {
-               return array(
-                       'limit' => 'How many comments to return',
-                       'continue' => 'When more results are available, use 
this to continue',
-                       'type' => 'Only return comments of the given type(s). 
If not set or empty, return all comments',
-                       'user' => 'Only return comments submitted by the given 
user',
-                       'myresponse' => 'Only return comments to which the 
current user has responded',
-                       'showunanswered' => 'Only return comments to which no 
one has responded',
-                       'prop' => array( 'Which properties to get:',
-                               '  metadata  - Comment ID, type, timestamp, 
user',
-                               '  formatted - HTML that would be displayed for 
this comment on Special:MoodBarFeedback',
-                               '  hidden    - Format the full HTML even if 
comments are hidden',
-                       ),
-               );
-       }
-
-       /**
-        * @deprecated since MediaWiki core 1.25
-        */
-       public function getDescription() {
-               return 'List all feedback comments submitted through the 
MoodBar extension.';
        }
 
        public function getCacheMode( $params ) {

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

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