* (bug 34889) User name should be normalized on Special:Contributions. Fixes regressi...
authorMax Semenik <maxsem@users.mediawiki.org>
Wed, 14 Mar 2012 16:31:52 +0000 (16:31 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Wed, 14 Mar 2012 16:31:52 +0000 (16:31 +0000)
RELEASE-NOTES-1.19
includes/specials/SpecialContributions.php

index c9db5c1..016bb03 100644 (file)
@@ -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.
index 0540474..c598457 100644 (file)
@@ -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' ) {