r94039 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94038‎ | r94039 | r94040 >
Date:08:08, 7 August 2011
Author:maxsem
Status:ok
Tags:
Comment:
Fixed sidebar tests on Windows. Can't use PHP_EOL here because \r\n is used only in SVN checkouts and not in tarballs
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/tests/phpunit/skins/SideBarTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/skins/SideBarTest.php
@@ -1,5 +1,8 @@
22 <?php
33
 4+/**
 5+ * @group Skin
 6+ */
47 class SideBarTest extends MediaWikiLangTestCase {
58
69 /** A skin template, reinitialized before each test */
Index: trunk/phase3/includes/Skin.php
@@ -1125,6 +1125,7 @@
11261126 if ( strpos( $line, '*' ) !== 0 ) {
11271127 continue;
11281128 }
 1129+ $line = rtrim( $line, "\r" ); // for Windows compat
11291130
11301131 if ( strpos( $line, '**' ) !== 0 ) {
11311132 $heading = trim( $line, '* ' );

Status & tagging log