'paraminfo' => 'ApiParamInfo',
'rsd' => 'ApiRsd',
'compare' => 'ApiComparePages',
+ 'tokens' => 'ApiTokens',
// Write modules
'purge' => 'ApiPurge',
// Die if token required, but not provided (unless there is a gettoken parameter)
$salt = $module->getTokenSalt();
- if ( $salt !== false && !$moduleParams['gettoken'] ) {
+ if ( $salt !== false && isset( $moduleParams['gettoken'] ) && !$moduleParams['gettoken'] ) {
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' );
}
}