r80475 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80474‎ | r80475 | r80476 >
Date:23:16, 17 January 2011
Author:hartman
Status:reverted (Comments)
Tags:
Comment:
Use str_replace instead of preg_replace. Follow up of r75769
Modified paths:
  • /trunk/phase3/includes/diff/WikiDiff.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/diff/WikiDiff.php
@@ -1045,7 +1045,7 @@
10461046
10471047 function getLines() {
10481048 $this->_flushLine( '~done' );
1049 - return preg_replace( '/\n/m', '', $this->_lines );
 1049+ return str_replace( '\n', '', $this->_lines );
10501050 }
10511051 }
10521052

Follow-up revisions

RevisionCommit summaryAuthorDate
r80620Revert r75769, r80475: mistaken attempt to fix bug 25725 by deleting random n...tstarling09:37, 20 January 2011
r806771.17: MFT r80109, r80113, r80223, r80475, r80554, r80575, r80620, r80621, r80...catrope03:12, 21 January 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75769Avoid unnecessary linebreaks in difflines. Fixes bug 25725hartman00:14, 1 November 2010

Comments

#Comment by Tim Starling (talk | contribs)   07:26, 20 January 2011

Single quotes around \n does not work. Marking fixme rather than fixing since you obviously haven't tested it.

Status & tagging log