From 57c2844f7baf084451807f137b928129da5160fc Mon Sep 17 00:00:00 2001 From: Rotem Liss Date: Tue, 21 Nov 2006 18:26:55 +0000 Subject: [PATCH] Replacing the manual user and user talk links of the blocker in Special:Ipblocklist to Linker::userLink and Linker::userToolLinks; for that, added the function Block::getBy, to get the blocker user ID. --- includes/Block.php | 10 ++++++++++ includes/SpecialIpblocklist.php | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/includes/Block.php b/includes/Block.php index 547bf53a12..93458b8ce2 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -544,6 +544,16 @@ class Block return $this->mNetworkBits; }*/ + /** + * @return The blocker user ID. + */ + public function getBy() { + return $this->mBy; + } + + /** + * @return The blocker user name. + */ function getByName() { if ( $this->mByName === false ) { diff --git a/includes/SpecialIpblocklist.php b/includes/SpecialIpblocklist.php index 9b10f42ca3..84f0a9c2f7 100644 --- a/includes/SpecialIpblocklist.php +++ b/includes/SpecialIpblocklist.php @@ -250,9 +250,10 @@ class IPUnblockForm { } # Prepare links to the blocker's user and talk pages + $blocker_id = $block->getBy(); $blocker_name = $block->getByName(); - $blocker = $sk->MakeLinkObj( Title::makeTitle( NS_USER, $blocker_name ), $blocker_name ); - $blocker .= ' (' . $sk->makeLinkObj( Title::makeTitle( NS_USER_TALK, $blocker_name ), $wgLang->getNsText( NS_TALK ) ) . ')'; + $blocker = $sk->userLink( $blocker_id, $blocker_name ); + $blocker .= $sk->userToolLinks( $blocker_id, $blocker_name ); # Prepare links to the block target's user and contribs. pages (as applicable, don't do it for autoblocks) if( $block->mAuto ) { -- 2.20.1