Index: trunk/extensions/AbuseFilter/AbuseFilter.parser.php |
— | — | @@ -1433,16 +1433,20 @@ |
1434 | 1434 | } |
1435 | 1435 | |
1436 | 1436 | protected function ccnorm( $s ) { |
1437 | | - if (!class_exists( 'AntiSpoof' ) ) { |
1438 | | - return $s; |
| 1437 | + static $equivset = null; |
| 1438 | + |
| 1439 | + if ( is_null( $equivset ) ) { |
| 1440 | + global $IP; |
| 1441 | + require( "$IP/extensions/AntiSpoof/equivset.php" ); |
1439 | 1442 | } |
1440 | 1443 | |
1441 | | - // Normalise confusable characters. |
1442 | | - $chars = AntiSpoof::stringToList( $s ); |
1443 | | - $chars = AntiSpoof::equivString( $chars ); |
1444 | | - $s = AntiSpoof::listToString( $chars ); |
1445 | | - |
1446 | | - return $s; |
| 1444 | + if (function_exists('fss_prep_replace')) { |
| 1445 | + $fss = fss_prep_replace( $equivset ); |
| 1446 | + |
| 1447 | + return fss_exec_replace( $fss, $s ); |
| 1448 | + } else { |
| 1449 | + return strtr( $s, $equivset ); |
| 1450 | + } |
1447 | 1451 | } |
1448 | 1452 | |
1449 | 1453 | protected function rmspecials( $s ) { |