r51498 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51497‎ | r51498 | r51499 >
Date:10:32, 5 June 2009
Author:werdna
Status:ok
Tags:
Comment:
Minor bugfixes to r51014 suggested on codereview by Tim.
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilterVariableHolder.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/AbuseFilterVariableHolder.php
@@ -190,7 +190,7 @@
191191 $text1 = $vars->getVar( $text1Var )->toString();
192192 $text2 = $vars->getVar( $text2Var )->toString();
193193 $result = wfDiff( $text1, $text2 );
194 - $result = trim( str_replace( "\ No newline at end of file\n", '', $result ) );
 194+ $result = trim( preg_replace( "/^\\\\ No newline at end of file\n/m", '', $result ) );
195195 break;
196196 case 'diff-split':
197197 $diff = $vars->getVar( $parameters['diff-var'] )->toString();
@@ -211,7 +211,7 @@
212212 $article = self::articleFromTitle( $parameters['namespace'],
213213 $parameters['title'] );
214214
215 - if ( $wgArticle && $article->getTitle() === $wgArticle->getTitle() ) {
 215+ if ( $wgArticle && $article->getTitle()->equals( $wgArticle->getTitle() ) ) {
216216 $textVar = $parameters['text-var'];
217217
218218 $new_text = $vars->getVar( $textVar )->toString();

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r51014Various code quality fixes for AbuseFilter suggested by Tim Starling in a pri...werdna13:08, 26 May 2009

Status & tagging log