* (bug 3475) anon contrib links on Special:Newpages
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 16 Sep 2005 05:08:42 +0000 (05:08 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 16 Sep 2005 05:08:42 +0000 (05:08 +0000)
RELEASE-NOTES
includes/SpecialNewpages.php

index 4425932..5f15b0b 100644 (file)
@@ -108,6 +108,7 @@ fully support the editing toolbar, but was found to be too confusing.
   format as designed. Documentation comments updated.
 * (bug 1423) LanguageJa.php update
 * Clean up duplicate code for selection of changeslist style
+* (bug 3475) anon contrib links on Special:Newpages
 
 
 === Caveats ===
index feb4c54..3b24cc2 100644 (file)
@@ -62,11 +62,13 @@ class NewPagesPage extends QueryPage {
                $length = wfMsg( 'nbytes', $wgLang->formatNum( $result->length ) );
 
                if ( $u == 0 ) { # not by a logged-in user
-                       $ul = $ut;
-               }
-               else {
-                       $ul = $skin->makeLink( $wgContLang->getNsText(NS_USER) . ":{$ut}", $ut );
+                       $userPage = Title::makeTitle( NS_SPECIAL, 'Contributions' );
+                       $linkParams = 'target=' . urlencode( $ut );
+               } else {
+                       $userPage = Title::makeTitle( NS_USER, $ut );
+                       $linkParams = '';
                }
+               $ul = $skin->makeLinkObj( $userPage, htmlspecialchars( $ut ), $linkParams );
 
                $d = $wgLang->timeanddate( $result->timestamp, true );