mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SpamBlacklist
synced 2024-11-23 22:54:57 +00:00
* (bug 11129) Hit spam blacklist on https: links
This commit is contained in:
parent
538532d887
commit
ee8ba1d25f
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue