Index: trunk/extensions/CheckUser/CheckUser_body.php |
— | — | @@ -368,16 +368,20 @@ |
369 | 369 | $s .= ' (' . $wgLang->timeanddate( $users_first[$name] ) . ' -- ' . $wgLang->timeanddate( $users_last[$name] ) . ') '; |
370 | 370 | $s .= ' [<strong>' . $count . '</strong>]<br/>'; |
371 | 371 | # Check if this user or IP is blocked |
| 372 | + # If so, give a link to the block log |
372 | 373 | $block = new Block(); |
373 | 374 | $block->fromMaster( false ); // use slaves |
374 | 375 | $ip = IP::isIPAddress( $name ) ? $name : ''; // only check IP blocks if we have an IP |
375 | 376 | if( $block->load( $ip, $users_ids[$name] ) ) { |
376 | | - $userpage = Title::makeTitle( NS_USER, $name ); |
377 | | - $blocklog = $sk->makeKnownLinkObj( $logs, wfMsgHtml('blockedtitle'), 'type=block&page=' . urlencode( $userpage->getPrefixedText() ) ); |
378 | | - if( IP::isIPAddress($block->mAddress) && strpos($block->mAddress,'/') ) |
| 377 | + if( IP::isIPAddress($block->mAddress) && strpos($block->mAddress,'/') ) { |
| 378 | + $userpage = Title::makeTitle( NS_USER, $block->mAddress ); |
| 379 | + $blocklog = $sk->makeKnownLinkObj( $logs, wfMsgHtml('blockedtitle'), 'type=block&page=' . $userpage->getPrefixedText() ); |
379 | 380 | $s .= '<strong>(' . $blocklog . ' - ' . $block->mAddress . ')</strong><br/>'; |
380 | | - else |
| 381 | + } else { |
| 382 | + $userpage = Title::makeTitle( NS_USER, $name ); |
| 383 | + $blocklog = $sk->makeKnownLinkObj( $logs, wfMsgHtml('blockedtitle'), 'type=block&page=' . urlencode( $userpage->getPrefixedText() ) ); |
381 | 384 | $s .= '<strong>(' . $blocklog . ')</strong><br/>'; |
| 385 | + } |
382 | 386 | } |
383 | 387 | $s .= '<ol>'; |
384 | 388 | # List out each IP/XFF combo for this username, and add the user agent for each |