r2625 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r2624‎ | r2625 | r2626 >
Date:03:17, 6 March 2004
Author:vibber
Status:old
Tags:
Comment:
In case of mysterious write failure, spit out the config file for manual paste. Haven't yet determined the exact failure condition, but a user is reporting this. (The is_writable() should catch it up above.)
Modified paths:
  • /trunk/phase3/config/index.php (modified) (history)

Diff [purge]

Index: trunk/phase3/config/index.php
@@ -387,11 +387,14 @@
388388
389389 /* Write out the config file now that all is well */
390390 print "<p>Creating LocalSettings.php...</p>\n\n";
 391+ $localSettings = "<" . "?php\n$local\n?" . ">";
391392 $f = fopen( "LocalSettings.php", "xt" );
392393 if( $f == false ) {
393 - dieout( "Couldn't write out LocalSettings.php. Check that the directory permissions are correct and that there isn't already a fiel of that name here." );
 394+ dieout( "Couldn't write out LocalSettings.php. Check that the directory permissions are correct and that there isn't already a file of that name here...</p>\n" .
 395+ "<p>Here's the file that would have been written, try to paste it into place manually:</p>\n" .
 396+ "<pre>\n" . htmlspecialchars( $localSettings ) . "</pre>\n" );
394397 }
395 - fwrite( $f, "<" . "?php\n$local\n?" . ">" );
 398+ fwrite( $f, $localSettings );
396399 fclose( $f );
397400
398401 print "<p>Success! Move the LocalSettings.php file into the parent directory, then follow

Status & tagging log