r113819 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113818‎ | r113819 | r113820 >
Date:16:31, 14 March 2012
Author:maxsem
Status:ok
Tags:
Comment:
* (bug 34889) User name should be normalized on Special:Contributions. Fixes regression from r103751.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -19,6 +19,7 @@
2020 * (bug 34887) $3 and $4 parameters are now substituted correctly in message
2121 "movepage-moved"
2222 * (bug 34841) Edit links are no longer displayed when display old page versions
 23+* (bug 34889) User name should be normalized on Special:Contributions
2324
2425 === Configuration changes in 1.19 ===
2526 * Removed SkinTemplateSetupPageCss hook; use BeforePageDisplay instead.
Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -71,12 +71,16 @@
7272 $this->opts['target'] = $target;
7373 $this->opts['topOnly'] = $request->getBool( 'topOnly' );
7474
75 - $userObj = User::newFromName( $target, false );
 75+ $nt = Title::makeTitleSafe( NS_USER, $target );
 76+ if ( !$nt ) {
 77+ $out->addHTML( $this->getForm() );
 78+ return;
 79+ }
 80+ $userObj = User::newFromName( $nt->getText(), false );
7681 if ( !$userObj ) {
7782 $out->addHTML( $this->getForm() );
7883 return;
7984 }
80 - $nt = $userObj->getUserPage();
8185 $id = $userObj->getID();
8286
8387 if ( $this->opts['contribs'] != 'newbie' ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r113820MFT r113819 to 1.19: (bug 34889) User name should be normalized on Special:Co...maxsem16:38, 14 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r103751In the spirit of r103745, guard against invalid user names in SpecialContribu...catrope11:29, 20 November 2011

Status & tagging log