summaryrefslogtreecommitdiff
path: root/includes/api/ApiUnblock.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-12-27 15:41:37 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-12-31 11:43:28 +0100
commitc1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch)
tree2b38796e738dd74cb42ecd9bfd151803108386bc /includes/api/ApiUnblock.php
parentb88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff)
Update to MediaWiki 1.24.1
Diffstat (limited to 'includes/api/ApiUnblock.php')
-rw-r--r--includes/api/ApiUnblock.php50
1 files changed, 7 insertions, 43 deletions
diff --git a/includes/api/ApiUnblock.php b/includes/api/ApiUnblock.php
index 6a739a2f..2854a825 100644
--- a/includes/api/ApiUnblock.php
+++ b/includes/api/ApiUnblock.php
@@ -89,64 +89,28 @@ class ApiUnblock extends ApiBase {
ApiBase::PARAM_TYPE => 'integer',
),
'user' => null,
- 'token' => null,
'reason' => '',
);
}
public function getParamDescription() {
$p = $this->getModulePrefix();
- return array(
- 'id' => "ID of the block you want to unblock (obtained through list=blocks). Cannot be used together with {$p}user",
- 'user' => "Username, IP address or IP range you want to unblock. Cannot be used together with {$p}id",
- 'token' => "An unblock token previously obtained through prop=info",
- 'reason' => 'Reason for unblock',
- );
- }
- public function getResultProperties() {
return array(
- '' => array(
- 'id' => array(
- ApiBase::PROP_TYPE => 'integer',
- ApiBase::PROP_NULLABLE => true
- ),
- 'user' => array(
- ApiBase::PROP_TYPE => 'string',
- ApiBase::PROP_NULLABLE => true
- ),
- 'userid' => array(
- ApiBase::PROP_TYPE => 'integer',
- ApiBase::PROP_NULLABLE => true
- ),
- 'reason' => array(
- ApiBase::PROP_TYPE => 'string',
- ApiBase::PROP_NULLABLE => true
- )
- )
+ 'id' => "ID of the block you want to unblock (obtained through list=blocks). " .
+ "Cannot be used together with {$p}user",
+ 'user' => "Username, IP address or IP range you want to unblock. " .
+ "Cannot be used together with {$p}id",
+ 'reason' => 'Reason for unblock',
);
}
public function getDescription() {
- return 'Unblock a user';
- }
-
- public function getPossibleErrors() {
- return array_merge( parent::getPossibleErrors(), array(
- array( 'unblock-notarget' ),
- array( 'unblock-idanduser' ),
- array( 'cantunblock' ),
- array( 'ipbblocked' ),
- array( 'ipbnounblockself' ),
- ) );
+ return 'Unblock a user.';
}
public function needsToken() {
- return true;
- }
-
- public function getTokenSalt() {
- return '';
+ return 'csrf';
}
public function getExamples() {