// 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;
}
$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'>
<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>