r105756 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105755‎ | r105756 | r105757 >
Date:08:40, 10 December 2011
Author:liangent
Status:ok
Tags:
Comment:
Followup r100969: There may be Mac newlines as well.
Modified paths:
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewDiff.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewDiff.php
@@ -302,10 +302,10 @@
303303
304304 function getMultiLineRow( $msg, $old, $new ) {
305305 if ( !is_array( $old ) ) {
306 - $old = explode( "\n", str_replace( "\r", '', $old ) );
 306+ $old = explode( "\n", preg_replace( "/\\\r\\\n?/", "\n", $old ) );
307307 }
308308 if ( !is_array( $new ) ) {
309 - $new = explode( "\n", str_replace( "\r", '', $new ) );
 309+ $new = explode( "\n", preg_replace( "/\\\r\\\n?/", "\n", $new ) );
310310 }
311311
312312 if ( $old == $new ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100969Normalize newline before exploding by "\n"liangent12:50, 27 October 2011

Status & tagging log