Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -223,7 +223,7 @@ |
224 | 224 | wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) ); |
225 | 225 | |
226 | 226 | $links = $wgLang->pipeList( $tools ); |
227 | | - $this->showBlock( $nt ); |
| 227 | + $this->showBlock( $nt, $id ); |
228 | 228 | } |
229 | 229 | |
230 | 230 | // Old message 'contribsub' had one parameter, but that doesn't work for |
— | — | @@ -241,8 +241,10 @@ |
242 | 242 | * Show a note if the user is blocked and display the last block log entry. |
243 | 243 | * @param Title $nt Title object for the target |
244 | 244 | */ |
245 | | - protected function showBlock( $nt ) { |
| 245 | + protected function showBlock( $nt, $id ) { |
246 | 246 | global $wgUser, $wgOut; |
| 247 | + if ( !User::newFromID( $id )->isBlocked() ) |
| 248 | + return; # User is not blocked, nothing to do here |
247 | 249 | $loglist = new LogEventsList( $wgUser->getSkin(), $wgOut ); |
248 | 250 | $pager = new LogPager( $loglist, 'block', false, $nt->getPrefixedText() ); |
249 | 251 | // Check if there is something in the block log. |