r21379 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r21378‎ | r21379 | r21380 >
Date:14:26, 19 April 2007
Author:brion
Status:old
Tags:
Comment:
remove sssllloowwwwwww range checks
Modified paths:
  • /trunk/phase3/includes/SpecialContributions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialContributions.php
@@ -71,29 +71,6 @@
7272 if ( $this->username == 'newbies' ) {
7373 $max = $this->dbr->selectField( 'user', 'max(user_id)', false, 'make_sql' );
7474 $condition = 'rev_user >' . (int)($max - $max / 100);
75 - } else if ( IP::isIPv4( $this->username ) && preg_match("/\/(24|16)$/", $this->username, $matches) ) {
76 - $abcd = explode( ".", $this->username );
77 - if( $matches[1] == 24 ) $ipmask = $abcd[0] . '.' . $abcd[1] . '.' . $abcd[2] . '.%';
78 - else $ipmask=$abcd[0] . '.' . $abcd[1] . '.%';
79 - $condition = 'rev_user_text LIKE ' . $this->dbr->addQuotes($ipmask);
80 - } else if ( IP::isIPv6( $this->username ) && preg_match("/^(?:64|80|96|112)$/", $this->username) ) {
81 - $abcdefgh = explode( ":", IP::sanitizeIP($this->username) );
82 - $abcd = implode( ":", array_slice($abcdefgh, 0, 4) );
83 - switch( $matches[1] ) {
84 - case '112':
85 - $ipmask = $abcd . ':' . $abcd[4] . ':' . $abcd[5] . ':' . $abcd[6] . ':%';
86 - break;
87 - case '96':
88 - $ipmask = $abcd . ':' . $abcd[4] . ':' . $abcd[5] . ':%';
89 - break;
90 - case '80':
91 - $ipmask = $abcd . ':' . $abcd[4] . ':%';
92 - break;
93 - case '64':
94 - $ipmask = $abcd . ':%';
95 - break;
96 - }
97 - $condition = 'rev_user_text LIKE ' . $this->dbr->addQuotes($ipmask);
9875 }
9976
10077 else if ( IP::isIPv6( $this->username ) ) {