Make the indexName functions more obviously laid out
[lhc/web/wiklou.git] / mw-config / index.php
index ed3e7f4..be9debc 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+// @codingStandardsIgnoreFile Generic.Arrays.DisallowLongArraySyntax
 /**
  * New version of MediaWiki web-based config/installation
  *
  * @file
  */
 
-// Bail if PHP is too low
-if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.3' ) < 0 ) {
-       // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
-       require dirname( dirname( __FILE__ ) ) . '/includes/PHPVersionError.php';
-       wfPHPVersionError( 'mw-config/index.php' );
-}
+// Bail on old versions of PHP, or if composer has not been run yet to install
+// dependencies. Using dirname( __FILE__ ) here because __DIR__ is PHP5.3+.
+// @codingStandardsIgnoreStart MediaWiki.Usage.DirUsage.FunctionFound
+require_once dirname( __FILE__ ) . '/../includes/PHPVersionCheck.php';
+// @codingStandardsIgnoreEnd
+wfEntryPointCheck( 'mw-config/index.php' );
 
 define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
 define( 'MEDIAWIKI_INSTALL', true );
@@ -71,6 +72,7 @@ function wfInstallerMain() {
                $langCode = 'en';
        }
        $wgLang = Language::factory( $langCode );
+       RequestContext::getMain()->setLanguage( $wgLang );
 
        $installer->setParserLanguage( $wgLang );