installer: Call getInfoBox() with raw wikitext, not transformed text
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 4 Jul 2019 21:17:16 +0000 (22:17 +0100)
committerKrinkle <krinklemail@gmail.com>
Fri, 5 Jul 2019 18:26:28 +0000 (18:26 +0000)
This will be run through the parser by getInfoBox(), and is documented
as taking raw wikitext, such as from Message::plain(). Calling with
text() is needlessly slower and may product incorrect results due to
applying transformations twice.

Also fix indentation for a wfMessage() call that was confusing
previously, seemingly passing 5 parameters with $4 being '<downloadlink/>'
when actually it is $3 and the line above continues a previous parameter.

Bug: T227297
Change-Id: Ice432e08b1c5f52db097f7c9f4fe6d69e1b04c2d

includes/installer/WebInstallerComplete.php
includes/installer/WebInstallerDBConnect.php
includes/installer/WebInstallerName.php

index 9f80489..685fa36 100644 (file)
@@ -48,14 +48,14 @@ class WebInstallerComplete extends WebInstallerPage {
                                wfMessage( $msg,
                                        $lsUrl,
                                        $this->getVar( 'wgServer' ) .
-                                       $this->getVar( 'wgScriptPath' ) . '/index.php',
+                                               $this->getVar( 'wgScriptPath' ) . '/index.php',
                                        '<downloadlink/>',
                                        $location ?: ''
                                )->plain(), 'tick-32.png'
                        )
                );
                $this->addHTML( $this->parent->getInfoBox(
-                       wfMessage( 'config-extension-link' )->text() ) );
+                       wfMessage( 'config-extension-link' )->plain() ) );
 
                $this->parent->restoreLinkPopups();
                $this->endForm( false, false );
index eb3a52f..7546bdf 100644 (file)
@@ -55,7 +55,7 @@ class WebInstallerDBConnect extends WebInstallerPage {
                        $dbSupport .= wfMessage( "config-dbsupport-$type" )->plain() . "\n";
                }
                $this->addHTML( $this->parent->getInfoBox(
-                       wfMessage( 'config-support-info', trim( $dbSupport ) )->text() ) );
+                       wfMessage( 'config-support-info', trim( $dbSupport ) )->plain() ) );
 
                // It's possible that the library for the default DB type is not compiled in.
                // In that case, instead select the first supported DB type in the list.
index 1222ac2..981e3a8 100644 (file)
@@ -115,7 +115,7 @@ class WebInstallerName extends WebInstallerPage {
                                'value' => true,
                        ] ) .
                        $this->getFieldsetEnd() .
-                       $this->parent->getInfoBox( wfMessage( 'config-almost-done' )->text() ) .
+                       $this->parent->getInfoBox( wfMessage( 'config-almost-done' )->plain() ) .
                        // getRadioSet() builds a set of labeled radio buttons.
                        // For grep: The following messages are used as the item labels:
                        // config-optional-continue, config-optional-skip