Merge "Resolve bug #18704 ("Add an unique CSS class or ID to the tagfilter table...
[lhc/web/wiklou.git] / includes / specials / SpecialContributions.php
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' ) {