From 5000a2b08f5ec250ef3ad1b525360e591f49b945 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Wed, 14 Mar 2012 16:31:52 +0000 Subject: [PATCH] * (bug 34889) User name should be normalized on Special:Contributions. Fixes regression from r103751. --- RELEASE-NOTES-1.19 | 1 + includes/specials/SpecialContributions.php | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index c9db5c173b..016bb0357e 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -19,6 +19,7 @@ production. * (bug 34887) $3 and $4 parameters are now substituted correctly in message "movepage-moved" * (bug 34841) Edit links are no longer displayed when display old page versions +* (bug 34889) User name should be normalized on Special:Contributions === Configuration changes in 1.19 === * Removed SkinTemplateSetupPageCss hook; use BeforePageDisplay instead. diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 054047412e..c598457061 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -71,12 +71,16 @@ class SpecialContributions extends SpecialPage { $this->opts['target'] = $target; $this->opts['topOnly'] = $request->getBool( 'topOnly' ); - $userObj = User::newFromName( $target, false ); + $nt = Title::makeTitleSafe( NS_USER, $target ); + if ( !$nt ) { + $out->addHTML( $this->getForm() ); + return; + } + $userObj = User::newFromName( $nt->getText(), false ); if ( !$userObj ) { $out->addHTML( $this->getForm() ); return; } - $nt = $userObj->getUserPage(); $id = $userObj->getID(); if ( $this->opts['contribs'] != 'newbie' ) { -- 2.20.1