X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiRevisionDelete.php;h=cbc3070422e2631aa6c0e54ba8515b35580a4b6b;hb=89fc181ab99fcd2024824aac343639d8a9ece28f;hp=2c76f371ee4c5edb875666532857bf422f70ada9;hpb=85d4e39ff096d05386fd2f333cd6acea66ad6f90;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiRevisionDelete.php b/includes/api/ApiRevisionDelete.php index 2c76f371ee..cbc3070422 100644 --- a/includes/api/ApiRevisionDelete.php +++ b/includes/api/ApiRevisionDelete.php @@ -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() {