Merge "mw.language.convertPlural: Check if matching form exists"
[lhc/web/wiklou.git] / includes / api / ApiUnblock.php
index 55e7331..dabb8da 100644 (file)
@@ -39,12 +39,6 @@ class ApiUnblock extends ApiBase {
                $user = $this->getUser();
                $params = $this->extractRequestParams();
 
-               if ( $params['gettoken'] ) {
-                       $res['unblocktoken'] = $user->getEditToken();
-                       $this->getResult()->addValue( null, $this->getModuleName(), $res );
-                       return;
-               }
-
                if ( is_null( $params['id'] ) && is_null( $params['user'] ) ) {
                        $this->dieUsageMsg( 'unblock-notarget' );
                }
@@ -96,21 +90,19 @@ class ApiUnblock extends ApiBase {
                        ),
                        'user' => null,
                        'token' => null,
-                       'gettoken' => array(
-                               ApiBase::PARAM_DFLT => false,
-                               ApiBase::PARAM_DEPRECATED => true,
-                       ),
                        '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",
+                       '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",
-                       'gettoken' => 'If set, an unblock token will be returned, and no other action will be taken',
                        'reason' => 'Reason for unblock',
                );
        }
@@ -118,10 +110,6 @@ class ApiUnblock extends ApiBase {
        public function getResultProperties() {
                return array(
                        '' => array(
-                               'unblocktoken' => array(
-                                       ApiBase::PROP_TYPE => 'string',
-                                       ApiBase::PROP_NULLABLE => true
-                               ),
                                'id' => array(
                                        ApiBase::PROP_TYPE => 'integer',
                                        ApiBase::PROP_NULLABLE => true