--- SpecialContributions.old.php Sun Jul 09 09:45:26 2006 +++ SpecialContributions.php Sun Aug 27 17:22:08 2006 @@ -58,14 +58,19 @@ if ( $this->username == 'newbies' ) { $max = $this->dbr->selectField( 'user', 'max(user_id)', false, 'make_sql' ); - $condition = '>' . (int)($max - $max / 100); + $condition = ' rev_user >' . (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 = $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 ; $index = 'user_timestamp'; } return array( $index, $condition ); @@ -231,6 +236,8 @@ 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 ) ) ); }