* (bug 750) Keep line endings consistent in LocalSettings.php
[lhc/web/wiklou.git] / config / index.php
index 74349e4..47a8fda 100644 (file)
@@ -1057,7 +1057,7 @@ function writeLocalSettings( $conf ) {
        }
 
        $sep = (DIRECTORY_SEPARATOR == "\\") ? ";" : ":";
-       return "
+       $localsettings = "
 # This file was automatically generated by the MediaWiki installer.
 # If you make manual changes, please keep track in case you need to
 # recreate them later.
@@ -1163,6 +1163,9 @@ if ( \$wgCommandLineMode ) {
 \$wgRightsIcon = \"{$slconf['RightsIcon']}\";
 # \$wgRightsCode = \"{$slconf['RightsCode']}\"; # Not yet used
 ";
+       // Keep things in Unix line endings internally;
+       // the system will write out as local text type.
+       return str_replace( "\r\n", "\n", $localsettings );
 }
 
 function dieout( $text ) {