From df3e3943bdf2b915dbf75ab498c35ea213743f11 Mon Sep 17 00:00:00 2001 From: Reedy Date: Mon, 2 Apr 2012 19:11:50 +0100 Subject: [PATCH] Bug 35646 - ApiBlockTest::testMakeNormalBlock() broken Change-Id: I964cde249ce7193cb1ba8c3430645c36067876fb --- includes/api/ApiBlock.php | 2 +- includes/api/ApiMain.php | 2 +- includes/api/ApiUnblock.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/api/ApiBlock.php b/includes/api/ApiBlock.php index 351ac6b721..7d3a40bb5f 100644 --- a/includes/api/ApiBlock.php +++ b/includes/api/ApiBlock.php @@ -47,7 +47,7 @@ class ApiBlock extends ApiBase { $params = $this->extractRequestParams(); if ( $params['gettoken'] ) { - $res['blocktoken'] = $user->getEditToken( '', $this->getMain()->getRequest() ); + $res['blocktoken'] = $user->getEditToken(); $this->getResult()->addValue( null, $this->getModuleName(), $res ); return; } diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 15b086162c..8f5cfcaf51 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -599,7 +599,7 @@ class ApiMain extends ApiBase { if ( !isset( $moduleParams['token'] ) ) { $this->dieUsageMsg( array( 'missingparam', 'token' ) ); } else { - if ( !$this->getUser()->matchEditToken( $moduleParams['token'], $salt, $this->getRequest() ) ) { + if ( !$this->getUser()->matchEditToken( $moduleParams['token'], $salt ) ) { $this->dieUsageMsg( 'sessionfailure' ); } } diff --git a/includes/api/ApiUnblock.php b/includes/api/ApiUnblock.php index db94fd5b93..e599e3286e 100644 --- a/includes/api/ApiUnblock.php +++ b/includes/api/ApiUnblock.php @@ -44,7 +44,7 @@ class ApiUnblock extends ApiBase { $params = $this->extractRequestParams(); if ( $params['gettoken'] ) { - $res['unblocktoken'] = $user->getEditToken( '', $this->getMain()->getRequest() ); + $res['unblocktoken'] = $user->getEditToken(); $this->getResult()->addValue( null, $this->getModuleName(), $res ); return; } -- 2.20.1