r14309 MediaWiki - Code Review archive

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

Diff [purge]

Index: trunk/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: trunk/phase3/RELEASE-NOTES
@@ -302,6 +302,7 @@
303303 * (bug 5187) Allow programmatically bypassing username validation, for scripts
304304 * (bug 6025) SpecialImport: wrong message when no file selected
305305 * (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')
306307
307308 == Compatibility ==
308309
Index: trunk/phase3/languages/Messages.php
@@ -395,6 +395,7 @@
396396 'loginsuccess' => "'''You are now logged in to {{SITENAME}} as \"$1\".'''",
397397 'nosuchuser' => 'There is no user by the name "$1". Check your spelling, or create a new account.',
398398 'nosuchusershort' => 'There is no user by the name "$1". Check your spelling.',
 399+'nouserspecified' => 'You have to specify a username.',
399400 'wrongpassword' => 'Incorrect password entered. Please try again.',
400401 'wrongpasswordempty' => 'Password entered was blank. Please try again.',
401402 'mailmypassword' => 'E-mail password',

Follow-up revisions

RevisionCommit summaryAuthorDate
r14310Backport from trunk r14309:...hashar08:53, 20 May 2006

Status & tagging log