mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 21:53:35 +00:00
Don't use wfDiff() in AbuseFilter
Bug: T158850 Change-Id: Ib5bd4eacc3dd26dc2abdf4eedce66ed228b326d8
This commit is contained in:
parent
26a72986a2
commit
630ef7f2ce
|
@ -153,9 +153,11 @@ class AFComputedVariable {
|
|||
case 'diff':
|
||||
$text1Var = $parameters['oldtext-var'];
|
||||
$text2Var = $parameters['newtext-var'];
|
||||
$text1 = $vars->getVar( $text1Var )->toString() . "\n";
|
||||
$text2 = $vars->getVar( $text2Var )->toString() . "\n";
|
||||
$result = wfDiff( $text1, $text2 );
|
||||
$text1 = $vars->getVar( $text1Var )->toString();
|
||||
$text2 = $vars->getVar( $text2Var )->toString();
|
||||
$diffs = new Diff( explode( "\n", $text1 ), explode( "\n", $text2 ) );
|
||||
$format = new UnifiedDiffFormatter();
|
||||
$result = $format->format( $diffs );
|
||||
break;
|
||||
case 'diff-split':
|
||||
$diff = $vars->getVar( $parameters['diff-var'] )->toString();
|
||||
|
|
Loading…
Reference in a new issue