Fix #6018: Special:Userrights -> wrong message when no user was specified
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 20 May 2006 08:51:59 +0000 (08:51 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 20 May 2006 08:51:59 +0000 (08:51 +0000)
Patch by Jimmy Collins <jimmy.collins@web.de>

RELEASE-NOTES
includes/SpecialUserrights.php
languages/Messages.php

index 69be18e..4482458 100644 (file)
@@ -302,6 +302,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 5187) Allow programmatically bypassing username validation, for scripts
 * (bug 6025) SpecialImport: wrong message when no file selected
 * (bug 6015) EditPage: add spacing in the boxes "edit is minor" and "watch this"
+* (bug 6018) Userrights: new message when no user specified ('nouserspecified')
 
 == Compatibility ==
 
index ef65f16..8f43092 100644 (file)
@@ -145,7 +145,10 @@ class UserrightsForm extends HTMLForm {
                global $wgOut, $wgUser;
 
                $user = User::newFromName($username);
-               if( is_null( $user ) || $user->getID() == 0 ) {
+               if( is_null( $user ) ) {
+                       $wgOut->addWikiText( wfMsg( 'nouserspecified' ) );
+                       return;
+               } elseif( $user->getID() == 0 ) {
                        $wgOut->addWikiText( wfMsg( 'nosuchusershort', wfEscapeWikiText( $username ) ) );
                        return;
                }
index c4a0404..57234bd 100644 (file)
@@ -395,6 +395,7 @@ Your account has been created. Don't forget to change your {{SITENAME}} preferen
 'loginsuccess' => "'''You are now logged in to {{SITENAME}} as \"$1\".'''",
 'nosuchuser'   => 'There is no user by the name "$1". Check your spelling, or create a new account.',
 'nosuchusershort'      => 'There is no user by the name "$1". Check your spelling.',
+'nouserspecified'      => 'You have to specify a username.',
 'wrongpassword'                => 'Incorrect password entered. Please try again.',
 'wrongpasswordempty'           => 'Password entered was blank. Please try again.',
 'mailmypassword'       => 'E-mail password',