From: Aaron Schulz Date: Mon, 22 Sep 2008 12:41:33 +0000 (+0000) Subject: Use IP::isIPAddress() to catch ranges and therefore show block/log links. (bug 13156) X-Git-Tag: 1.31.0-rc.0~45144 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24ze_article%22%29%20.%20%22?a=commitdiff_plain;h=e36ac6c936364fa3f6a5e6278c537c09745982d1;p=lhc%2Fweb%2Fwiklou.git Use IP::isIPAddress() to catch ranges and therefore show block/log links. (bug 13156) --- 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() );