Glaisher has uploaded a new change for review.
https://gerrit.wikimedia.org/r/301345
Change subject: Remove deprecated API methods
......................................................................
Remove deprecated API methods
Change-Id: I1e7ebeaa3b77471750d9bd2e832a541dd5eb6d3c
---
M includes/api/ApiGlobalBlock.php
M includes/api/ApiQueryGlobalBlocks.php
2 files changed, 2 insertions(+), 69 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalBlocking
refs/changes/45/301345/1
diff --git a/includes/api/ApiGlobalBlock.php b/includes/api/ApiGlobalBlock.php
index d1d4940..0e8bce8 100644
--- a/includes/api/ApiGlobalBlock.php
+++ b/includes/api/ApiGlobalBlock.php
@@ -94,40 +94,6 @@
}
/**
- * @deprecated since MediaWiki core 1.25
- */
- public function getParamDescription() {
- return array(
- 'target' => 'The target IP.',
- 'expiry' => array(
- 'If specified, will block or reblock the user.',
- "Determines how long the block will last for,
e.g. '5 months' or '2 weeks'.",
- "If set to 'infinite' or 'indefinite' the block
will never expire."
- ),
- 'unblock' => 'If specified, will unblock the user.',
- 'reason' => 'The reason for blocking/unblocking.',
- 'anononly' => 'Specify this if the block should only
affect logged-out users.',
- 'token' => 'Your edit token.'
- );
- }
-
- /**
- * @deprecated since MediaWiki core 1.25
- */
- public function getDescription() {
- return "Globally block or unblock a user.";
- }
-
- /**
- * @deprecated since MediaWiki core 1.25
- */
- public function getExamples() {
- return array(
-
'api.php?action=globalblock&target=127.0.0.1&expiry=indefinite&reason=Cross-wiki%20abuse&token=123ABC',
- );
- }
-
- /**
* @see ApiBase::getExamplesMessages()
*/
protected function getExamplesMessages() {
diff --git a/includes/api/ApiQueryGlobalBlocks.php
b/includes/api/ApiQueryGlobalBlocks.php
index a693ad4..772fc97 100644
--- a/includes/api/ApiQueryGlobalBlocks.php
+++ b/includes/api/ApiQueryGlobalBlocks.php
@@ -140,6 +140,7 @@
}
$data[] = $block;
}
+
$result->setIndexedTagName( $data, 'block' );
$result->addValue( 'query', $this->getModuleName(), $data );
}
@@ -162,8 +163,7 @@
'older'
),
ApiBase :: PARAM_DFLT => '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',
),
'ids' => array(
ApiBase :: PARAM_TYPE => 'integer',
@@ -198,39 +198,6 @@
protected function getDB() {
return GlobalBlocking::getGlobalBlockingDatabase( DB_SLAVE );
- }
-
- /**
- * @deprecated since MediaWiki core 1.25
- */
- public function getParamDescription() {
- return array(
- 'start' => 'The timestamp to start enumerating from',
- 'end' => 'The timestamp to stop enumerating at',
- 'dir' => 'The direction in which to enumerate',
- 'ids' => 'Pipe-separated list of block IDs to list
(optional)',
- 'addresses' => 'Pipe-separated list of addresses to
search for (optional)',
- 'ip' => array( 'Get all blocks applying to this IP or
CIDR range, including range blocks.',
- 'Cannot be used together with bkusers. CIDR
ranges broader than /16 are not accepted.' ),
- 'limit' => 'The maximum amount of blocks to list',
- 'prop' => 'Which properties to get',
- );
- }
-
- /**
- * @deprecated since MediaWiki core 1.25
- */
- public function getDescription() {
- return 'List all globally blocked IP addresses.';
- }
-
- /**
- * @deprecated since MediaWiki core 1.25
- */
- public function getExamples() {
- return array( 'api.php?action=query&list=globalblocks',
-
'api.php?action=query&list=globalblocks&bgip=217.121.114.116'
- );
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/301345
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e7ebeaa3b77471750d9bd2e832a541dd5eb6d3c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalBlocking
Gerrit-Branch: master
Gerrit-Owner: Glaisher <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits