r62568 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62567‎ | r62568 | r62569 >
Date:01:38, 16 February 2010
Author:reedy
Status:ok
Tags:
Comment:
Handle token existance and validation in ApiBase
Modified paths:
  • /trunk/extensions/FlaggedRevs/api/ApiReview.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/api/ApiReview.php
@@ -41,8 +41,6 @@
4242 $this->dieUsageMsg( array( 'badaccess-group0' ) );
4343 if( $wgUser->isBlocked() )
4444 $this->dieUsageMsg( array( 'blockedtext' ) );
45 - if( !$wgUser->matchEditToken( $params['token'] ) )
46 - $this->dieUsageMsg( array( 'sessionfailure' ) );
4745
4846 // Construct submit form
4947 $form = new RevisionReview();
@@ -162,6 +160,10 @@
163161 public function getDescription() {
164162 return 'Review a revision via FlaggedRevs.';
165163 }
 164+
 165+ public function getTokenSalt() {
 166+ return null;
 167+ }
166168
167169 protected function getExamples() {
168170 return 'api.php?action=review&revid=12345&token=123AB&flag_accuracy=1&comment=Ok';

Status & tagging log