Don't use `phpcs:ignoreFile` to selectively ignore sniffs
[lhc/web/wiklou.git] / mw-config / index.php
index 31b201c..a47822b 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+// phpcs:disable Generic.Arrays.DisallowLongArraySyntax
 /**
  * New version of MediaWiki web-based config/installation
  *
@@ -22,9 +23,8 @@
 
 // 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
+// phpcs:ignore MediaWiki.Usage.DirUsage.FunctionFound
 require_once dirname( __FILE__ ) . '/../includes/PHPVersionCheck.php';
-// @codingStandardsIgnoreEnd
 wfEntryPointCheck( 'mw-config/index.php' );
 
 define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
@@ -43,7 +43,6 @@ function wfInstallerMain() {
        $installer = InstallerOverrides::getWebInstaller( $wgRequest );
 
        if ( !$installer->startSession() ) {
-
                if ( $installer->request->getVal( "css" ) ) {
                        // Do not display errors on css pages
                        $installer->outputCss();
@@ -71,6 +70,7 @@ function wfInstallerMain() {
                $langCode = 'en';
        }
        $wgLang = Language::factory( $langCode );
+       RequestContext::getMain()->setLanguage( $wgLang );
 
        $installer->setParserLanguage( $wgLang );
 
@@ -79,5 +79,4 @@ function wfInstallerMain() {
        $session = $installer->execute( $session );
 
        $_SESSION['installData'][$fingerprint] = $session;
-
 }