Per comments, follow-up to r70278: make patrol tokens compatibles between api and...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 7 Aug 2010 18:56:52 +0000 (18:56 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 7 Aug 2010 18:56:52 +0000 (18:56 +0000)
includes/Article.php
includes/diff/DifferenceInterface.php

index 2614aea..48ba854 100644 (file)
@@ -1307,7 +1307,7 @@ class Article {
                }
 
                $sk = $wgUser->getSkin();
-               $token = $wgUser->editToken( $rcid );
+               $token = $wgUser->editToken();
 
                $wgOut->addHTML(
                        "<div class='patrollink'>" .
@@ -2366,7 +2366,7 @@ class Article {
                # If we haven't been given an rc_id value, we can't do anything
                $rcid = (int) $wgRequest->getVal( 'rcid' );
 
-               if ( !$wgUser->matchEditToken( $wgRequest->getVal( 'token' ), $rcid ) ) {
+               if ( !$wgUser->matchEditToken( $wgRequest->getVal( 'token' ) ) ) {
                        $wgOut->showErrorPage( 'sessionfailure-title', 'sessionfailure' );
                        return;
                }
index c75c7c0..bb210ec 100644 (file)
@@ -236,7 +236,7 @@ CONTROL;
                        }
                        // Build the link
                        if( $rcid ) {
-                               $token = $wgUser->editToken( $rcid );
+                               $token = $wgUser->editToken();
                                $patrol = ' <span class="patrollink">[' . $sk->link(
                                        $this->mTitle, 
                                        wfMsgHtml( 'markaspatrolleddiff' ),
@@ -463,7 +463,7 @@ CONTROL;
                # Add redundant patrol link on bottom...
                if( $this->mRcidMarkPatrolled && $this->mTitle->quickUserCan('patrol') ) {
                        $sk = $wgUser->getSkin();
-                       $token = $wgUser->editToken( $this->mRcidMarkPatrolled );
+                       $token = $wgUser->editToken();
                        $wgOut->addHTML(
                                "<div class='patrollink'>[" . $sk->link(
                                        $this->mTitle,