* (bug 11129) Hit spam blacklist on https: links

This commit is contained in:
Brion Vibber 2007-09-11 18:13:40 +00:00
parent 538532d887
commit ee8ba1d25f

View file

@ -308,10 +308,10 @@ class SpamRegexBatch {
function buildRegexes( $lines, $batchSize=4096 ) {
# Make regex
# It's faster using the S modifier even though it will usually only be run once
//$regex = 'http://+[a-z0-9_\-.]*(' . implode( '|', $lines ) . ')';
//$regex = 'https?://+[a-z0-9_\-.]*(' . implode( '|', $lines ) . ')';
//return '/' . str_replace( '/', '\/', preg_replace('|\\\*/|', '/', $regex) ) . '/Si';
$regexes = array();
$regexStart = '/http:\/\/+[a-z0-9_\-.]*(';
$regexStart = '/https?:\/\/+[a-z0-9_\-.]*(';
$regexEnd = ($batchSize > 0 ) ? ')/Si' : ')/i';
$build = false;
foreach( $lines as $line ) {