From: Tim Starling Date: Mon, 6 Dec 2010 08:11:31 +0000 (+0000) Subject: * Update NoLocalSettings.php for the new installer. Stop advising users to move Local... X-Git-Tag: 1.31.0-rc.0~33533 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/rappels.php?a=commitdiff_plain;h=be3a7a3e30bfd018bce333ec00d233e9a1caccbb;p=lhc%2Fweb%2Fwiklou.git * 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. --- diff --git a/includes/installer/CoreInstaller.php b/includes/installer/CoreInstaller.php index 8809ea2bad..0ad8eb61cb 100644 --- a/includes/installer/CoreInstaller.php +++ b/includes/installer/CoreInstaller.php @@ -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; } diff --git a/includes/templates/NoLocalSettings.php b/includes/templates/NoLocalSettings.php index 88510cce49..d31b226d3c 100644 --- a/includes/templates/NoLocalSettings.php +++ b/includes/templates/NoLocalSettings.php @@ -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'] ) ); +} ?> @@ -37,13 +48,16 @@ $ext = pathinfo( $script, PATHINFO_EXTENSION );

MediaWiki

+

LocalSettings.php not found.

+

config/LocalSettings.php to the parent directory.' ); + if ( $installerStarted ) { + echo( "Please complete the installation and download LocalSettings.php." ); } else { - echo( "Please set up the wiki first." ); + echo( "Please set up the wiki first." ); } ?> +