https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113820

Revision: 113820
Author:   maxsem
Date:     2012-03-14 16:38:55 +0000 (Wed, 14 Mar 2012)
Log Message:
-----------
MFT r113819 to 1.19: (bug 34889) User name should be normalized on 
Special:Contributions

Modified Paths:
--------------
    branches/REL1_19/phase3/RELEASE-NOTES-1.19
    branches/REL1_19/phase3/includes/specials/SpecialContributions.php

Modified: branches/REL1_19/phase3/RELEASE-NOTES-1.19
===================================================================
--- branches/REL1_19/phase3/RELEASE-NOTES-1.19  2012-03-14 16:31:52 UTC (rev 
113819)
+++ branches/REL1_19/phase3/RELEASE-NOTES-1.19  2012-03-14 16:38:55 UTC (rev 
113820)
@@ -19,6 +19,7 @@
 * (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.

Modified: branches/REL1_19/phase3/includes/specials/SpecialContributions.php
===================================================================
--- branches/REL1_19/phase3/includes/specials/SpecialContributions.php  
2012-03-14 16:31:52 UTC (rev 113819)
+++ branches/REL1_19/phase3/includes/specials/SpecialContributions.php  
2012-03-14 16:38:55 UTC (rev 113820)
@@ -74,12 +74,16 @@
                $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' ) {


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to