r14310 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14309‎ | r14310 | r14311 >
Date:08:53, 20 May 2006
Author:hashar
Status:old
Tags:
Comment:
Backport from trunk r14309:
Fix #6018: Special:Userrights -> wrong message when no user was specified
Patch by Jimmy Collins <jimmy.collins@web.de>
Modified paths:
  • /branches/REL1_6/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_6/phase3/includes/SpecialUserrights.php (modified) (history)
  • /branches/REL1_6/phase3/languages/Messages.php (modified) (history)

Diff [purge]

Index: branches/REL1_6/phase3/includes/SpecialUserrights.php
@@ -145,7 +145,10 @@
146146 global $wgOut, $wgUser;
147147
148148 $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 ) {
150153 $wgOut->addWikiText( wfMsg( 'nosuchusershort', wfEscapeWikiText( $username ) ) );
151154 return;
152155 }
Index: branches/REL1_6/phase3/RELEASE-NOTES
@@ -12,6 +12,7 @@
1313 * (bug 5957) Update for Hebrew language (he)
1414 * (bug 6025) SpecialImport: wrong message when no file selected
1515 * (bug 6015) EditPage: add spacing in the boxes "edit is minor" and "watch this"
 16+* (bug 6018) Userrights: new message when no user specified ('nouserspecified')
1617
1718 == MediaWiki 1.6.5 ==
1819
Index: branches/REL1_6/phase3/languages/Messages.php
@@ -399,6 +399,7 @@
400400 'loginsuccess' => "'''You are now logged in to {{SITENAME}} as \"$1\".'''",
401401 'nosuchuser' => 'There is no user by the name "$1". Check your spelling, or create a new account.',
402402 'nosuchusershort' => 'There is no user by the name "$1". Check your spelling.',
 403+'nouserspecified' => 'You have to specify a username.',
403404 'wrongpassword' => 'Incorrect password entered. Please try again.',
404405 'wrongpasswordempty' => 'Password entered was blank. Please try again.',
405406 'mailmypassword' => 'E-mail password',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r14309Fix #6018: Special:Userrights -> wrong message when no user was specified...hashar08:51, 20 May 2006

Status & tagging log