From: Tim Starling Date: Mon, 5 Mar 2007 13:06:22 +0000 (+0000) Subject: Revert r20075, causes SQL error. X-Git-Tag: 1.31.0-rc.0~53910 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=b2769c3a5de4142d21113ff40e46e1f248bfd45b;p=lhc%2Fweb%2Fwiklou.git Revert r20075, causes SQL error. --- diff --git a/includes/SpecialContributions.php b/includes/SpecialContributions.php index c6cd3224a6..e1d9f9d6f7 100644 --- a/includes/SpecialContributions.php +++ b/includes/SpecialContributions.php @@ -71,18 +71,13 @@ class ContribsFinder { if ( $this->username == 'newbies' ) { $max = $this->dbr->selectField( 'user', 'max(user_id)', false, 'make_sql' ); $condition = '>' . (int)($max - $max / 100); - } else if ( preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/(24|16)/", $this->username) ) { - $abcd = explode( ".", $this->username ); - if( substr( $this->username, -2 ) == 24 ) $ipmask = $abcd[0] . '.' . $abcd[1] . '.' . $abcd[2] . '.%'; - else $ipmask=$abcd[0] . '.' . $abcd[1] . '.%'; - $condition = 'rev_user_text LIKE ' . $this->dbr->addQuotes($ipmask); } if ( $condition == '' ) { $condition = ' rev_user_text=' . $this->dbr->addQuotes( $this->username ); $index = 'usertext_timestamp'; } else { - #$condition = ' rev_user '.$condition ; + $condition = ' rev_user '.$condition ; $index = 'user_timestamp'; } return array( $index, $condition ); @@ -267,8 +262,6 @@ function wfSpecialContributions( $par = null ) { if ( $target == 'newbies' ) { $wgOut->setSubtitle( wfMsgHtml( 'sp-contributions-newbies-sub') ); - } else if ( preg_match( "/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/(24|16)/", $target ) ) { - $wgOut->setSubtitle( wfMsgHtml( 'contribsub', $target ) ); } else { $wgOut->setSubtitle( wfMsgHtml( 'contribsub', contributionsSub( $nt ) ) ); }