More informative error message for when the user forgot to move LocalSettings.php...
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 26 Sep 2004 10:41:48 +0000 (10:41 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 26 Sep 2004 10:41:48 +0000 (10:41 +0000)
includes/Setup.php
index.php

index 983f15d..0c2fdbf 100644 (file)
@@ -47,6 +47,10 @@ if( $wgUseSquid && isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
        $wgIP = '127.0.0.1';
 }
 
+if ( $wgUseData ) {
+       $wgExtraNamespaces[20] = 'Data' ;
+       $wgExtraNamespaces[21] = 'Data_talk' ;
+}
 
 $fname = 'Setup.php';
 wfProfileIn( $fname );
index 704f792..ffc481d 100644 (file)
--- a/index.php
+++ b/index.php
@@ -5,9 +5,13 @@
 $wgRequestTime = microtime();
 
 unset( $IP );
-@ini_set( "allow_url_fopen", 0 ); # For security...
-if(!file_exists("LocalSettings.php")) {
-       die( "You'll have to <a href='config/index.php'>set the wiki up</a> first!" );
+@ini_set( 'allow_url_fopen', 0 ); # For security...
+if( !file_exists( 'LocalSettings.php' ) ) {
+       if ( file_exists( 'config/LocalSettings.php' ) ) {
+               die( "To complete the installation, move <tt>config/LocalSettings.php</tt> to the parent directory.\n" );
+       } else {
+               die( "You'll have to <a href='config/index.php'>set the wiki up</a> first!" );
+       }
 }
 
 # Valid web server entry point, enable includes.
@@ -18,11 +22,6 @@ define( "MEDIAWIKI", true );
 
 require_once( "./includes/Defines.php" );
 require_once( "./LocalSettings.php" );
-if ( $wgUseData )
-       {
-       $wgExtraNamespaces[20] = 'Data' ;
-       $wgExtraNamespaces[21] = 'Data_talk' ;
-       }
 require_once( "includes/Setup.php" );
 
 wfProfileIn( "main-misc-setup" );