From 92ab15aca835ee46ebdfa20f320d9576f93f1427 Mon Sep 17 00:00:00 2001 From: Tobias Date: Mon, 7 Sep 2009 12:04:07 +0000 Subject: [PATCH] fixing r55909: checking if the user is _currently_ blocked before displaying block log (on Special:Contributions) --- includes/specials/SpecialContributions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index c78c337a8f..e365ba820a 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -223,7 +223,7 @@ class SpecialContributions extends SpecialPage { wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) ); $links = $wgLang->pipeList( $tools ); - $this->showBlock( $nt ); + $this->showBlock( $nt, $id ); } // Old message 'contribsub' had one parameter, but that doesn't work for @@ -241,8 +241,10 @@ class SpecialContributions extends SpecialPage { * Show a note if the user is blocked and display the last block log entry. * @param Title $nt Title object for the target */ - protected function showBlock( $nt ) { + protected function showBlock( $nt, $id ) { global $wgUser, $wgOut; + if ( !User::newFromID( $id )->isBlocked() ) + return; # User is not blocked, nothing to do here $loglist = new LogEventsList( $wgUser->getSkin(), $wgOut ); $pager = new LogPager( $loglist, 'block', false, $nt->getPrefixedText() ); // Check if there is something in the block log. -- 2.20.1