From a0274a70d8627beb331d49f5e9fa2f8d76c62f7a Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Sat, 2 Dec 2006 08:52:54 +0000 Subject: [PATCH] Update linker to make contributions links (in userToolLinks and userLink) and block links (blockLink) use subpage notation, rather than pass the target as a parameter --- includes/Linker.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/includes/Linker.php b/includes/Linker.php index ba66873922..2a02312151 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -765,9 +765,9 @@ class Linker { function userLink( $userId, $userText ) { $encName = htmlspecialchars( $userText ); if( $userId == 0 ) { - $contribsPage = SpecialPage::getTitleFor( 'Contributions' ); + $contribsPage = SpecialPage::getTitleFor( 'Contributions', $userText ); return $this->makeKnownLinkObj( $contribsPage, - $encName, 'target=' . urlencode( $userText ) ); + $encName); } else { $userPage = Title::makeTitle( NS_USER, $userText ); return $this->makeLinkObj( $userPage, $encName ); @@ -790,9 +790,9 @@ class Linker { $items[] = $this->userTalkLink( $userId, $userText ); } if( $userId ) { - $contribsPage = SpecialPage::getTitleFor( 'Contributions' ); - $items[] = $this->makeKnownLinkObj( $contribsPage, - wfMsgHtml( 'contribslink' ), 'target=' . urlencode( $userText ) ); + $contribsPage = SpecialPage::getTitleFor( 'Contributions', $userText ); + $items[] = $this->makeKnownLinkObj( $contribsPage , + wfMsgHtml( 'contribslink' ) ); } if( $blockable && $wgUser->isAllowed( 'block' ) ) { $items[] = $this->blockLink( $userId, $userText ); @@ -827,9 +827,9 @@ class Linker { * @private */ function blockLink( $userId, $userText ) { - $blockPage = SpecialPage::getTitleFor( 'Blockip' ); + $blockPage = SpecialPage::getTitleFor( 'Blockip', $userText ); $blockLink = $this->makeKnownLinkObj( $blockPage, - wfMsgHtml( 'blocklink' ), 'ip=' . urlencode( $userText ) ); + wfMsgHtml( 'blocklink' ) ); return $blockLink; } -- 2.20.1