Index: trunk/phase3/includes/Article.php |
— | — | @@ -3332,8 +3332,7 @@ |
3333 | 3333 | $rollbackErrors = $this->mTitle->getUserPermissionsErrors( 'rollback', $wgUser ); |
3334 | 3334 | $errors = array_merge( $editErrors, wfArrayDiff2( $rollbackErrors, $editErrors ) ); |
3335 | 3335 | |
3336 | | - $t = new Token( array( $this->mTitle->getPrefixedText(), $fromP ) ); |
3337 | | - if ( !$t->match( $token ) ) { |
| 3336 | + if ( !$wgUser->matchEditToken( $token, array( $this->mTitle->getPrefixedText(), $fromP ) ) ) { |
3338 | 3337 | $errors[] = array( 'sessionfailure' ); |
3339 | 3338 | } |
3340 | 3339 | |
Index: trunk/phase3/includes/Linker.php |
— | — | @@ -1500,7 +1500,7 @@ |
1501 | 1501 | $query = array( |
1502 | 1502 | 'action' => 'rollback', |
1503 | 1503 | 'from' => $rev->getUserText(), |
1504 | | - 'token' => Token::prepare( array( $title->getPrefixedText(), $rev->getUserText() ) ), |
| 1504 | + 'token' => $wgUser->editToken( array( $title->getPrefixedText(), $rev->getUserText() ) ), |
1505 | 1505 | ); |
1506 | 1506 | if ( $wgRequest->getBool( 'bot' ) ) { |
1507 | 1507 | $query['bot'] = '1'; |
Index: trunk/phase3/includes/api/ApiQueryRevisions.php |
— | — | @@ -78,7 +78,8 @@ |
79 | 79 | if ( !$wgUser->isAllowed( 'rollback' ) ) { |
80 | 80 | return false; |
81 | 81 | } |
82 | | - return Token::prepare( array( $title->getPrefixedText(), $rev->getUserText() ) ); |
| 82 | + return $wgUser->editToken( array( $title->getPrefixedText(), |
| 83 | + $rev->getUserText() ) ); |
83 | 84 | } |
84 | 85 | |
85 | 86 | public function execute() { |