Merge "Language: s/error_log/wfWarn/"
[lhc/web/wiklou.git] / includes / api / ApiUnblock.php
index f34d4df..2854a82 100644 (file)
@@ -89,7 +89,6 @@ class ApiUnblock extends ApiBase {
                                ApiBase::PARAM_TYPE => 'integer',
                        ),
                        'user' => null,
-                       'token' => null,
                        'reason' => '',
                );
        }
@@ -102,54 +101,16 @@ class ApiUnblock extends ApiBase {
                                "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
-                               )
-                       )
-               );
-       }
-
        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' ),
-               ) );
-       }
-
        public function needsToken() {
-               return true;
-       }
-
-       public function getTokenSalt() {
-               return '';
+               return 'csrf';
        }
 
        public function getExamples() {