Merge "Refactor: Use local variables for editsections in Parser"
[lhc/web/wiklou.git] / includes / api / ApiRevisionDelete.php
index 2c76f37..cbc3070 100644 (file)
@@ -195,10 +195,6 @@ class ApiRevisionDelete extends ApiBase {
                                ApiBase::PARAM_TYPE => array( 'yes', 'no', 'nochange' ),
                                ApiBase::PARAM_DFLT => 'nochange',
                        ),
-                       'token' => array(
-                               ApiBase::PARAM_TYPE => 'string',
-                               ApiBase::PARAM_REQUIRED => true
-                       ),
                        'reason' => null,
                );
        }
@@ -211,7 +207,6 @@ class ApiRevisionDelete extends ApiBase {
                        'hide' => 'What to hide for each revision',
                        'show' => 'What to unhide for each revision',
                        'suppress' => 'Whether to suppress data from administrators as well as others',
-                       'token' => 'A delete token previously retrieved through action=tokens',
                        'reason' => 'Reason for the deletion/undeletion',
                );
        }
@@ -220,22 +215,8 @@ class ApiRevisionDelete extends ApiBase {
                return 'Delete/undelete revisions.';
        }
 
-       public function getPossibleErrors() {
-               return array_merge( parent::getPossibleErrors(),
-                       array(
-                               array( 'code' => 'needtarget',
-                                       'info' => 'A target title is required for this RevDel type' ),
-                               array( 'code' => 'badparams', 'info' => 'Bad value for some parameter' ),
-                       )
-               );
-       }
-
        public function needsToken() {
-               return true;
-       }
-
-       public function getTokenSalt() {
-               return '';
+               return 'csrf';
        }
 
        public function getExamples() {