* (bug 750) Keep line endings consistent in LocalSettings.php
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 22 Jun 2005 21:59:56 +0000 (21:59 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 22 Jun 2005 21:59:56 +0000 (21:59 +0000)
RELEASE-NOTES
config/index.php

index 44e89a2..6072b11 100644 (file)
@@ -323,6 +323,7 @@ Various bugfixes, small features, and a few experimental things:
   the factually inaccurate text that was there.
 * (bug 2178) Fix temp dir check again
 * (bug 2488) Format 'deletedtext' message as wikitext
+* (bug 750) Keep line endings consistent in LocalSettings.php
 
 
 === Caveats ===
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 ) {