r63135 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63134‎ | r63135 | r63136 >
Date:21:01, 1 March 2010
Author:ialex
Status:ok
Tags:
Comment:
* (bug 22664) Special:Userrights now accepts '0' as a valid user name
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserrights.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUserrights.php
@@ -49,7 +49,7 @@
5050 // any groups, it's a bit silly to give them the user search prompt.
5151 global $wgUser, $wgRequest, $wgOut;
5252
53 - if( $par ) {
 53+ if( $par !== null ) {
5454 $this->mTarget = $par;
5555 } else {
5656 $this->mTarget = $wgRequest->getVal( 'user' );
@@ -67,7 +67,7 @@
6868
6969 $available = $this->changeableGroups();
7070
71 - if ( !$this->mTarget ) {
 71+ if ( $this->mTarget === null ) {
7272 /*
7373 * If the user specified no target, and they can only
7474 * edit their own groups, automatically set them as the
@@ -121,7 +121,7 @@
122122 }
123123
124124 // show some more forms
125 - if( $this->mTarget ) {
 125+ if( $this->mTarget !== null ) {
126126 $this->editUserGroupsForm( $this->mTarget );
127127 }
128128 }
@@ -291,7 +291,7 @@
292292 }
293293 }
294294
295 - if( $name == '' ) {
 295+ if( $name === '' ) {
296296 return new WikiErrorMsg( 'nouserspecified' );
297297 }
298298
@@ -311,7 +311,7 @@
312312 }
313313 } else {
314314 $name = User::getCanonicalName( $name );
315 - if( !$name ) {
 315+ if( $name === false ) {
316316 // invalid name
317317 return new WikiErrorMsg( 'nosuchusershort', $username );
318318 }
Index: trunk/phase3/RELEASE-NOTES
@@ -29,6 +29,7 @@
3030 settings changed
3131 * (bug 22606) The body of e-mail address confirmation message is now different
3232 when the address changed
 33+* (bug 22664) Special:Userrights now accepts '0' as a valid user name
3334
3435 == API changes in 1.17 ==
3536

Status & tagging log