From: Timo Tijhof Date: Thu, 4 Jul 2019 21:17:16 +0000 (+0100) Subject: installer: Call getInfoBox() with raw wikitext, not transformed text X-Git-Tag: 1.34.0-rc.0~1123^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=37895f28f4d07226c76919b13748c882a054ec52 installer: Call getInfoBox() with raw wikitext, not transformed text 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 '' when actually it is $3 and the line above continues a previous parameter. Bug: T227297 Change-Id: Ice432e08b1c5f52db097f7c9f4fe6d69e1b04c2d --- diff --git a/includes/installer/WebInstallerComplete.php b/includes/installer/WebInstallerComplete.php index 9f804891cb..685fa36744 100644 --- a/includes/installer/WebInstallerComplete.php +++ b/includes/installer/WebInstallerComplete.php @@ -48,14 +48,14 @@ class WebInstallerComplete extends WebInstallerPage { wfMessage( $msg, $lsUrl, $this->getVar( 'wgServer' ) . - $this->getVar( 'wgScriptPath' ) . '/index.php', + $this->getVar( 'wgScriptPath' ) . '/index.php', '', $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 ); diff --git a/includes/installer/WebInstallerDBConnect.php b/includes/installer/WebInstallerDBConnect.php index eb3a52f6f3..7546bdf9d2 100644 --- a/includes/installer/WebInstallerDBConnect.php +++ b/includes/installer/WebInstallerDBConnect.php @@ -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. diff --git a/includes/installer/WebInstallerName.php b/includes/installer/WebInstallerName.php index 1222ac2f3f..981e3a8113 100644 --- a/includes/installer/WebInstallerName.php +++ b/includes/installer/WebInstallerName.php @@ -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