Fixlet for two-pass dump: strip carriage returns to normalize newlines.
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 19 Oct 2005 20:51:01 +0000 (20:51 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 19 Oct 2005 20:51:01 +0000 (20:51 +0000)
maintenance/dumpTextPass.php

index 235196b..6b3b2ab 100644 (file)
@@ -118,7 +118,10 @@ class TextPassDumper extends BackupDumper {
                        array( 'old_text', 'old_flags' ),
                        array( 'old_id' => $id ),
                        'TextPassDumper::getText' );
-               return UtfNormal::cleanUp( strval( Revision::getRevisionText( $row ) ) );
+               $text = Revision::getRevisionText( $row );
+               $stripped = str_replace( "\r", "", $text );
+               $normalized = UtfNormal::cleanUp( $stripped );
+               return $normalized;
        }
        
        function startElement( $parser, $name, $attribs ) {