From: Antoine Musso Date: Sat, 13 Nov 2004 19:41:08 +0000 (+0000) Subject: Probably solve http://bugzilla.wikipedia.org/show_bug.cgi?id=733 X-Git-Tag: 1.5.0alpha1~1351 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=24d6d0c60d391d8b058511d548deaa0523fdb9d1;p=lhc%2Fweb%2Fwiklou.git Probably solve bugzilla.wikipedia.org/show_bug.cgi?id=733 Die with error message if we can't fwrite localsettings.php. --- diff --git a/config/index.php b/config/index.php index ef570f763d..fe0ad95f2e 100644 --- a/config/index.php +++ b/config/index.php @@ -595,11 +595,16 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { "

Here's the file that would have been written, try to paste it into place manually:

\n" . "
\n" . htmlspecialchars( $localSettings ) . "
\n" ); } - fwrite( $f, $localSettings ); - fclose( $f ); + if(fwrite( $f, $localSettings ) ) { + fclose( $f ); - print "

Success! Move the config/LocalSettings.php file into the parent directory, then follow - this link to your wiki.

\n"; + print "

Success! Move the config/LocalSettings.php file into the parent directory, then follow + this link to your wiki.

\n"; + } else { + fclose( $f ); + die("

An error occured while writing the config/LocalSettings.php file. Check user rights and disk space then try again.

\n"); + + } } while( false ); }