installer: Restore "complete" success message

Bug: T384524
Change-Id: I433e381eb1f388584e36bbfd2b40665b61ec22eb
(cherry picked from commit ec17519993e4475588e70c0b9a3b9b7bfcda3268)
This commit is contained in:
Timo Tijhof 2025-02-17 04:34:17 +00:00 committed by Krinkle
parent 6ea3f2f4f5
commit d1ebddf51b
3 changed files with 9 additions and 32 deletions

View file

@ -1126,21 +1126,6 @@ class WebInstaller extends Installer {
);
}
/**
* Helper for "Download LocalSettings" link.
*
* @internal For use in WebInstallerComplete class
* @return string Html for download link
*/
public function makeDownloadLinkHtml() {
$anchor = Html::rawElement( 'a',
[ 'href' => $this->getUrl( [ 'localsettings' => 1 ] ) ],
wfMessage( 'config-download-localsettings' )->parse()
);
return Html::rawElement( 'div', [ 'class' => 'config-download-link' ], $anchor );
}
/**
* If the software package wants the LocalSettings.php file
* to be placed in a specific location, override this function

View file

@ -21,9 +21,6 @@
namespace MediaWiki\Installer;
use HtmlArmor;
use MediaWiki\Message\Message;
class WebInstallerComplete extends WebInstallerPage {
public function execute() {
@ -36,19 +33,14 @@ class WebInstallerComplete extends WebInstallerPage {
$location = $this->parent->getLocalSettingsLocation();
$msg = 'config-install-done';
if ( $location !== false ) {
// config-install-done-path
$msg .= '-path';
$msg = 'config-install-done-path';
}
$this->addHTML(
$this->parent->getInfoBox(
new HtmlArmor( wfMessage( $msg,
$lsUrl,
$this->getVar( 'wgServer' ) .
$this->getVar( 'wgScriptPath' ) . '/index.php',
Message::rawParam( $this->parent->makeDownloadLinkHtml() ),
$location ?: ''
)->parse() )
)
$this->parent->showSuccess( $msg,
$lsUrl,
$this->getVar( 'wgServer' ) .
$this->getVar( 'wgScriptPath' ) . '/index.php',
"[$lsUrl " . wfMessage( 'config-download-localsettings' )->plain() . ']',
$location ?: ''
);
$this->addHTML( $this->parent->getInfoBox(
wfMessage( 'config-extension-link' )->plain() ) );

View file

@ -308,8 +308,8 @@
"config-install-mainpage-exists": "Warning shown when installer attempts to create main page but it already exists.",
"config-install-extension-tables": "Notice shown to the user during the install about progress.",
"config-install-mainpage-failed": "Used as error message. Parameters:\n* $1 - detailed error message",
"config-install-done": "Parameters:\n* $1 is the URL to LocalSettings download\n* $2 is a link to the wiki.\n* $3 is a download link with attached download icon. The config-download-localsettings message will be used as the link text.",
"config-install-done-path": "Parameters:\n* $1 is the URL to LocalSettings download\n* $2 is a link to the wiki.\n* $3 is a download link with attached download icon. The config-download-localsettings message will be used as the link text.\n* $4 is the filesystem location of where the LocalSettings.php file should be saved to.",
"config-install-done": "Parameters:\n* $1 is the URL to LocalSettings download\n* $2 is a link to the wiki.\n* $3 is a download link. The config-download-localsettings message will be used as the link text.",
"config-install-done-path": "Parameters:\n* $1 is the URL to LocalSettings download\n* $2 is a link to the wiki.\n* $3 is a download link. The config-download-localsettings message will be used as the link text.\n* $4 is the filesystem location of where the LocalSettings.php file should be saved to.",
"config-install-success": "Gives user information that installation was successful. Only shown in command line installer. Parameters:\n* $1 - server name\n* $2 - script path",
"config-install-db-success": "Shown after DB is set up. In web installer this is step prior to downloading LocalSettings.php",
"config-download-localsettings": "The link text used in the download link in config-install-done.",