From e36ac6c936364fa3f6a5e6278c537c09745982d1 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 22 Sep 2008 12:41:33 +0000 Subject: [PATCH] Use IP::isIPAddress() to catch ranges and therefore show block/log links. (bug 13156) --- includes/specials/SpecialContributions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 694690dc2a..541da75a2d 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -326,12 +326,13 @@ function contributionsSub( $nt, $id ) { if( $talk ) { # Talk page link $tools[] = $sk->makeLinkObj( $talk, wfMsgHtml( 'talkpagelinktext' ) ); - if( ( $id != 0 && $wgSysopUserBans ) || ( $id == 0 && User::isIP( $nt->getText() ) ) ) { + if( ( $id != 0 && $wgSysopUserBans ) || ( $id == 0 && IP::isIPAddress( $nt->getText() ) ) ) { # Block link if( $wgUser->isAllowed( 'block' ) ) $tools[] = $sk->makeKnownLinkObj( SpecialPage::getTitleFor( 'Blockip', $nt->getDBkey() ), wfMsgHtml( 'blocklink' ) ); # Block log link - $tools[] = $sk->makeKnownLinkObj( SpecialPage::getTitleFor( 'Log' ), wfMsgHtml( 'sp-contributions-blocklog' ), 'type=block&page=' . $nt->getPrefixedUrl() ); + $tools[] = $sk->makeKnownLinkObj( SpecialPage::getTitleFor( 'Log' ), + wfMsgHtml( 'sp-contributions-blocklog' ), 'type=block&page=' . $nt->getPrefixedUrl() ); } # Other logs link $tools[] = $sk->makeKnownLinkObj( SpecialPage::getTitleFor( 'Log' ), wfMsgHtml( 'log' ), 'user=' . $nt->getPartialUrl() ); -- 2.20.1