Revert, Follow-up: -1 recent contributors
[lhc/web/wiklou.git] / includes / installer / Installer.php
index 9c87cf0..12e8dd1 100644 (file)
@@ -216,7 +216,7 @@ abstract class Installer {
                '_UpgradeKeySupplied' => false,
                '_ExistingDBSettings' => false,
 
-               // $wgLogo is probably wrong (bug 48084); set something that will work.
+               // $wgLogo is probably wrong (T50084); set something that will work.
                // Single quotes work fine here, as LocalSettingsGenerator outputs this unescaped.
                'wgLogo' => '$wgResourceBasePath/resources/assets/wiki.png',
                'wgAuthenticationTokenVersion' => 1,
@@ -446,6 +446,8 @@ abstract class Installer {
                $this->parserTitle = Title::newFromText( 'Installer' );
                $this->parserOptions = new ParserOptions( $wgUser ); // language will be wrong :(
                $this->parserOptions->setEditSection( false );
+               // Don't try to access DB before user language is initialised
+               $this->setParserLanguage( Language::factory( 'en' ) );
        }
 
        /**
@@ -674,7 +676,7 @@ abstract class Installer {
                try {
                        $out = $wgParser->parse( $text, $this->parserTitle, $this->parserOptions, $lineStart );
                        $html = $out->getText();
-               } catch ( DBAccessError $e ) {
+               } catch ( MediaWiki\Services\ServiceDisabledException $e ) {
                        $html = '<!--DB access attempted during parse-->  ' . htmlspecialchars( $text );
 
                        if ( !empty( $this->debug ) ) {
@@ -722,6 +724,7 @@ abstract class Installer {
                                'ss_good_articles' => 0,
                                'ss_total_pages' => 0,
                                'ss_users' => 0,
+                               'ss_active_users' => 0,
                                'ss_images' => 0
                        ],
                        __METHOD__, 'IGNORE'
@@ -1431,7 +1434,7 @@ abstract class Installer {
                        );
                }
                // Unset everyone else's hooks. Lord knows what someone might be doing
-               // in ParserFirstCallInit (see bug 27171)
+               // in ParserFirstCallInit (see T29171)
                $GLOBALS['wgHooks'] = [ 'LoadExtensionSchemaUpdates' => $hooksWeWant ];
 
                return Status::newGood();