From: Reedy Date: Mon, 2 Apr 2012 18:11:50 +0000 (+0100) Subject: Bug 35646 - ApiBlockTest::testMakeNormalBlock() broken X-Git-Tag: 1.31.0-rc.0~24072^2 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=df3e3943bdf2b915dbf75ab498c35ea213743f11;p=lhc%2Fweb%2Fwiklou.git Bug 35646 - ApiBlockTest::testMakeNormalBlock() broken Change-Id: I964cde249ce7193cb1ba8c3430645c36067876fb --- 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; }