From: Rob Church Date: Wed, 22 Mar 2006 16:09:21 +0000 (+0000) Subject: Show links to user page, talk page and contributions page on Special:Newpages X-Git-Tag: 1.6.0~169 X-Git-Url: http://git.cyclocoop.org/%22.%24redirect_annul.%22?a=commitdiff_plain;h=a3b41258d698a3ea37de1defa2fea3b136fdf7cb;p=lhc%2Fweb%2Fwiklou.git Show links to user page, talk page and contributions page on Special:Newpages --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 1c5f7331f8..7660375706 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -378,6 +378,7 @@ Special Pages: account creation is disabled. * JavaScript filter for Special:Allmessages * (bug 3047) Don't mention talk pages on Special:Movepage when there isn't one +* Show links to user page, talk page and contributions page on Special:Newpages Misc.: * PHP 4.1 compatibility fix: don't use new_link parameter to mysql_connect diff --git a/includes/SpecialNewpages.php b/includes/SpecialNewpages.php index 2ab576b015..fe100ccf43 100644 --- a/includes/SpecialNewpages.php +++ b/includes/SpecialNewpages.php @@ -65,14 +65,10 @@ class NewPagesPage extends QueryPage { $length = wfMsg( 'nbytes', $wgLang->formatNum( $result->length ) ); - if ( $u == 0 ) { # not by a logged-in user - $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 ); + $userLink = $skin->makeLinkObj( Title::makeTitle( NS_USER, $ut ), htmlspecialchars( $ut ) ); + $talkLink = $skin->makeLinkObj( Title::makeTitle( NS_USER_TALK, $ut ), $wgLang->getNsText( NS_TALK ) ); + $contLink = $skin->makeLinkObj( Title::makeTitle( NS_SPECIAL, 'Contributions' ), wfMsg( 'contribslink' ), 'target=' . urlencode( $ut ) ); + $userTools = "$userLink ($talkLink | $contLink)"; $d = $wgLang->timeanddate( $result->timestamp, true ); @@ -85,7 +81,7 @@ class NewPagesPage extends QueryPage { $link = $skin->makeKnownLink( $ns . ':' . $result->title, '' ); } - $s = "{$d} {$link} ({$length}) . . {$ul}"; + $s = "{$d} {$link} ({$length}) . . {$userTools}"; $s .= $skin->commentBlock( $result->comment ); return $s; }