r62715 MediaWiki - Code Review archive
Repository:
MediaWiki
Revision:
<
r62714
|
r62715
|
r62716
>
Date:
19:44, 19 February 2010
Author:
reedy
Status:
ok
Tags:
Comment:
r65299
c5894 followup
Move isset check of gettoken upto level of $salt !== false. If gettoken is set, the module isn't going to do anything else (and therefore no point seeing if there is a token set, let alone attempting to validate it)
Modified paths:
/trunk/phase3/includes/api/ApiMain.php
(modified) (
history
)
Diff
[
purge
]
Index: trunk/phase3/includes/api/ApiMain.php
—
—
@@ -416,9 +416,9 @@
417
417
418
418
// Die if token required, but not provided (unless there is a gettoken parameter)
419
419
$salt = $module->getTokenSalt();
420
- if ( $salt !== false )
420
+ if ( $salt !== false && !isset( $moduleParams['gettoken'] ) )
421
421
{
422
- if ( !isset( $moduleParams['token'] ) && !isset( $moduleParams['gettoken'] ) ) {
422
+ if ( !isset( $moduleParams['token'] ) ) {
423
423
$this->dieUsageMsg( array( 'missingparam', 'token' ) );
424
424
} else {
425
425
global $wgUser;
Status & tagging log
21:06, 19 February 2010
Catrope
(
talk
|
contribs
)
changed the
status
of r62715
[
removed:
new
added:
ok]