Merge "Document return string as JavaScript code for getScript"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 3 Apr 2017 17:00:29 +0000 (17:00 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 3 Apr 2017 17:00:29 +0000 (17:00 +0000)
RELEASE-NOTES-1.29
includes/installer/Installer.php
tests/phpunit/includes/api/ApiMainTest.php

index 2371ed3..b9b6485 100644 (file)
@@ -37,7 +37,6 @@ production.
   added to $wgExtraLanguageCodes instead.
 
 === New features in 1.29 ===
-* (T137376) New language support: Atikamekw (atj)
 * (T5233) A cookie can now be set when a user is autoblocked, to track that user
   if they move to a new IP address. This is disabled by default.
 * Added ILocalizedException interface to standardize the use of localized
@@ -161,6 +160,7 @@ changes to languages because of Phabricator reports.
   The new or reinstated language fallbacks are (after cs ↔ sk in 1.28):
   ca ↔ oc; hsb ↔ dsb; io → eo; mdf → ru; pnt → el; roa-tara → it; rup → ro;
   sh → bs, sr-el, hr.
+* (T137376) New language support: Atikamekw (atj).
 * (T155957) Talk Namespaces for Javanese language (jv) have been updated.
 
 ==== No fallback for Ukrainian ====
index f03fe6a..0a2b808 100644 (file)
@@ -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 ) ) {
index 5c0a5d9..922f7f1 100644 (file)
@@ -331,8 +331,6 @@ class ApiMainTest extends ApiTestCase {
        }
 
        public static function provideApiErrorFormatterCreation() {
-               global $wgContLang;
-
                return [
                        'Default (BC)' => [ [], [
                                'uselang' => 'ru',
@@ -382,9 +380,9 @@ class ApiMainTest extends ApiTestCase {
                        'uselang=content' => [
                                [ 'uselang' => 'content', 'errorformat' => 'plaintext' ],
                                [
-                                       'uselang' => $wgContLang->getCode(),
+                                       'uselang' => 'en',
                                        'class' => ApiErrorFormatter::class,
-                                       'lang' => $wgContLang->getCode(),
+                                       'lang' => 'en',
                                        'format' => 'plaintext',
                                        'usedb' => false,
                                ]
@@ -394,7 +392,7 @@ class ApiMainTest extends ApiTestCase {
                                [
                                        'uselang' => 'ru',
                                        'class' => ApiErrorFormatter::class,
-                                       'lang' => $wgContLang->getCode(),
+                                       'lang' => 'en',
                                        'format' => 'plaintext',
                                        'usedb' => false,
                                ]