http://www.mediawiki.org/wiki/Special:Code/MediaWiki/56304

Revision: 56304
Author:   siebrand
Date:     2009-09-14 14:17:18 +0000 (Mon, 14 Sep 2009)

Log Message:
-----------
Add a newline after read and a newline on export to prevent incorrect parsing 
on export.

Modified Paths:
--------------
    trunk/extensions/Translate/scripts/magic-export.php

Modified: trunk/extensions/Translate/scripts/magic-export.php
===================================================================
--- trunk/extensions/Translate/scripts/magic-export.php 2009-09-14 13:54:46 UTC 
(rev 56303)
+++ trunk/extensions/Translate/scripts/magic-export.php 2009-09-14 14:17:18 UTC 
(rev 56304)
@@ -66,7 +66,7 @@
        if ( !file_exists($file) ) continue;
        STDOUT( "Processing {$group->getLabel()}... ", $group->getId() );
 
-       $input = file_get_contents( $file );
+       $input = file_get_contents( $file ) . "\n";
 
        $headerEnd = strpos( $input, "\n);\n" );
 
@@ -98,5 +98,5 @@
        }
 
        wfMkdirParents( dirname($options['target'] . "/$filename") );
-       file_put_contents( $options['target'] . "/$filename", trim( $output ) );
+       file_put_contents( $options['target'] . "/$filename", trim( $output ) . 
"\n" );
 }



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to