* Update NoLocalSettings.php for the new installer. Stop advising users to move LocalSettings.php from config/, the new installer doesn't create it. I imagine I'm not the only one with copies of LocalSettings.php lying around everywhere.

* Fix the installer session name to be something that makes sense, instead of my_wiki_session.
This commit is contained in:
Tim Starling 2010-12-06 08:11:31 +00:00
parent 41b92f3343
commit be3a7a3e30
2 changed files with 20 additions and 3 deletions

View file

@ -494,6 +494,9 @@ abstract class CoreInstaller extends Installer {
// Allow multiple ob_flush() calls
$GLOBALS['wgDisableOutputCompression'] = true;
// Use a sensible cookie prefix (not my_wiki)
$GLOBALS['wgCookiePrefix'] = 'mw_installer';
// Some of the environment checks make shell requests, remove limits
$GLOBALS['wgMaxShellMemory'] = 0;
}

View file

@ -13,6 +13,17 @@ $script = $_SERVER['SCRIPT_NAME'];
$path = pathinfo( $script, PATHINFO_DIRNAME ) . '/';
$path = str_replace( '//', '/', $path );
$ext = pathinfo( $script, PATHINFO_EXTENSION );
# Check to see if the installer is running
if ( !function_exists( 'session_name' ) ) {
$installerStarted = false;
} else {
session_name( 'mw_installer_session' );
$oldReporting = error_reporting( E_ALL & ~E_NOTICE );
$success = session_start();
error_reporting( $oldReporting );
$installerStarted = ( $success && isset( $_SESSION['installData'] ) );
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' lang='en'>
@ -37,13 +48,16 @@ $ext = pathinfo( $script, PATHINFO_EXTENSION );
<h1>MediaWiki <?php echo htmlspecialchars( $wgVersion ) ?></h1>
<div class='error'>
<p>LocalSettings.php not found.</p>
<p>
<?php
if ( file_exists( 'config/LocalSettings.php' ) ) {
echo( 'To complete the installation, move <tt>config/LocalSettings.php</tt> to the parent directory.' );
if ( $installerStarted ) {
echo( "Please <a href=\"" . htmlspecialchars( $path ) . "config/index." . htmlspecialchars( $ext ) . "\"> complete the installation</a> and download LocalSettings.php." );
} else {
echo( "Please <a href=\"" . htmlspecialchars( $path ) . "config/index." . htmlspecialchars( $ext ) . "\" title='setup'> set up the wiki</a> first." );
echo( "Please <a href=\"" . htmlspecialchars( $path ) . "config/index." . htmlspecialchars( $ext ) . "\"> set up the wiki</a> first." );
}
?>
</p>
</div>
</body>