r87352 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87351‎ | r87352 | r87353 >
Date:20:23, 3 May 2011
Author:mah
Status:ok (Comments)
Tags:
Comment:
PLEASE TEST: Bug #26332 — Patch that I think should fix the problem
according to the comments, but needs more testing

* Also, a one line w/s fix up
Modified paths:
  • /trunk/extensions/SpamBlacklist/SpamBlacklist_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SpamBlacklist/SpamBlacklist_body.php
@@ -11,7 +11,7 @@
1212 var $warningTime = 600;
1313 var $expiryTime = 900;
1414 var $warningChance = 100;
15 - var $ignoreEditSummary = false;
 15+ var $ignoreEditSummary = false;
1616
1717 function __construct( $settings = array() ) {
1818 foreach ( $settings as $name => $value ) {
@@ -408,7 +408,7 @@
409409 $build = $line;
410410 } elseif( strlen( $build ) + strlen( $line ) > $batchSize ) {
411411 $regexes[] = $regexStart .
412 - str_replace( '/', '\/', preg_replace('|\\\*/|', '/', $build) ) .
 412+ str_replace( '/', '\/', preg_replace('|\\\*/|u', '/', $build) ) .
413413 $regexEnd;
414414 $build = $line;
415415 } else {
@@ -418,7 +418,7 @@
419419 }
420420 if( $build !== false ) {
421421 $regexes[] = $regexStart .
422 - str_replace( '/', '\/', preg_replace('|\\\*/|', '/', $build) ) .
 422+ str_replace( '/', '\/', preg_replace('|\\\*/|u', '/', $build) ) .
423423 $regexEnd;
424424 }
425425 return $regexes;

Comments

#Comment by Nikerabbit (talk | contribs)   07:27, 4 May 2011

For the lazy like me the bug reads Spam-blacklist does not support unicode characters in regex, needed to filter internationalized domain names.

Status & tagging log