diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
commit | c9aa36da061816dee256a979c2ff8d2ee41824d9 (patch) | |
tree | 29f7002b80ee984b488bd047dbbd80b36bf892e9 /includes/api/ApiUnblock.php | |
parent | b4274e0e33eafb5e9ead9d949ebf031a9fb8363b (diff) | |
parent | d1ba966140d7a60cd5ae4e8667ceb27c1a138592 (diff) |
Merge branch 'archwiki'
# Conflicts:
# skins/ArchLinux.php
# skins/ArchLinux/archlogo.gif
Diffstat (limited to 'includes/api/ApiUnblock.php')
-rw-r--r-- | includes/api/ApiUnblock.php | 50 |
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() { |