X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiUndelete.php;h=07aad9f57d137945cdddfddbcefcccb74734bb82;hb=fdddf94570efc33fd06f16c72d41636a45cf203a;hp=349297218010e9073221fe83364f22d0278cf372;hpb=73784bb98a9f14c867258f50145ad86935111587;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiUndelete.php b/includes/api/ApiUndelete.php index 3492972180..07aad9f57d 100644 --- a/includes/api/ApiUndelete.php +++ b/includes/api/ApiUndelete.php @@ -96,10 +96,6 @@ class ApiUndelete extends ApiBase { ApiBase::PARAM_TYPE => 'string', ApiBase::PARAM_REQUIRED => true ), - 'token' => array( - ApiBase::PARAM_TYPE => 'string', - ApiBase::PARAM_REQUIRED => true - ), 'reason' => '', 'timestamps' => array( ApiBase::PARAM_TYPE => 'timestamp', @@ -124,10 +120,6 @@ class ApiUndelete extends ApiBase { public function getParamDescription() { return array( 'title' => 'Title of the page you want to restore', - 'token' => array( - 'An undelete token previously retrieved through list=deletedrevs, or ', - 'a delete token retrieved through action=tokens.' - ), 'reason' => 'Reason for restoring', 'timestamps' => array( 'Timestamps of the revisions to restore.', @@ -142,17 +134,6 @@ class ApiUndelete extends ApiBase { ); } - public function getResultProperties() { - return array( - '' => array( - 'title' => 'string', - 'revisions' => 'integer', - 'filerevisions' => 'integer', - 'reason' => 'string' - ) - ); - } - public function getDescription() { return array( 'Restore certain revisions of a deleted page. A list of deleted revisions ', @@ -161,21 +142,8 @@ class ApiUndelete extends ApiBase { ); } - public function getPossibleErrors() { - return array_merge( parent::getPossibleErrors(), array( - array( 'permdenied-undelete' ), - array( 'blockedtext' ), - array( 'invalidtitle', 'title' ), - array( 'cannotundelete' ), - ) ); - } - public function needsToken() { - return true; - } - - public function getTokenSalt() { - return ''; + return 'csrf'; } public function getExamples() {