Index: trunk/phase3/includes/SpecialUserrights.php |
— | — | @@ -145,7 +145,10 @@ |
146 | 146 | global $wgOut, $wgUser; |
147 | 147 | |
148 | 148 | $user = User::newFromName($username); |
149 | | - if( is_null( $user ) || $user->getID() == 0 ) { |
| 149 | + if( is_null( $user ) ) { |
| 150 | + $wgOut->addWikiText( wfMsg( 'nouserspecified' ) ); |
| 151 | + return; |
| 152 | + } elseif( $user->getID() == 0 ) { |
150 | 153 | $wgOut->addWikiText( wfMsg( 'nosuchusershort', wfEscapeWikiText( $username ) ) ); |
151 | 154 | return; |
152 | 155 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -302,6 +302,7 @@ |
303 | 303 | * (bug 5187) Allow programmatically bypassing username validation, for scripts |
304 | 304 | * (bug 6025) SpecialImport: wrong message when no file selected |
305 | 305 | * (bug 6015) EditPage: add spacing in the boxes "edit is minor" and "watch this" |
| 306 | +* (bug 6018) Userrights: new message when no user specified ('nouserspecified') |
306 | 307 | |
307 | 308 | == Compatibility == |
308 | 309 | |
Index: trunk/phase3/languages/Messages.php |
— | — | @@ -395,6 +395,7 @@ |
396 | 396 | 'loginsuccess' => "'''You are now logged in to {{SITENAME}} as \"$1\".'''", |
397 | 397 | 'nosuchuser' => 'There is no user by the name "$1". Check your spelling, or create a new account.', |
398 | 398 | 'nosuchusershort' => 'There is no user by the name "$1". Check your spelling.', |
| 399 | +'nouserspecified' => 'You have to specify a username.', |
399 | 400 | 'wrongpassword' => 'Incorrect password entered. Please try again.', |
400 | 401 | 'wrongpasswordempty' => 'Password entered was blank. Please try again.', |
401 | 402 | 'mailmypassword' => 'E-mail password', |