diff options
author | Timo Tijhof <krinkle@fastmail.com> | 2025-02-17 04:34:17 +0000 |
---|---|---|
committer | Timo Tijhof <krinkle@fastmail.com> | 2025-02-17 22:58:17 +0000 |
commit | ec17519993e4475588e70c0b9a3b9b7bfcda3268 (patch) | |
tree | e76c9319eee76f2fb6ead704490462120dd6b932 /includes/installer | |
parent | 379d3842bd4fcc2bd0587ea85a81bb68ed5a285a (diff) | |
download | mediawikicore-ec17519993e4475588e70c0b9a3b9b7bfcda3268.tar.gz mediawikicore-ec17519993e4475588e70c0b9a3b9b7bfcda3268.zip |
installer: Restore "complete" success message
* The `<div>` for the download icon was once upon a time styled
in an elaborate way, but all this has slowly lost to redesigns.
It is now a useless wrapper for an otherwise plain external link,
so let's make it just that.
Bug: T384524
Change-Id: I433e381eb1f388584e36bbfd2b40665b61ec22eb
Diffstat (limited to 'includes/installer')
-rw-r--r-- | includes/installer/WebInstaller.php | 15 | ||||
-rw-r--r-- | includes/installer/WebInstallerComplete.php | 22 | ||||
-rw-r--r-- | includes/installer/i18n/qqq.json | 4 |
3 files changed, 9 insertions, 32 deletions
diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 19d414616711..277251a6866a 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -1124,21 +1124,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 * (see mw-config/overrides/README) to return the path of diff --git a/includes/installer/WebInstallerComplete.php b/includes/installer/WebInstallerComplete.php index 09c27c2b4459..1206482c4322 100644 --- a/includes/installer/WebInstallerComplete.php +++ b/includes/installer/WebInstallerComplete.php @@ -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() ) ); diff --git a/includes/installer/i18n/qqq.json b/includes/installer/i18n/qqq.json index 9cb2b0bdcfe7..6fb9067b5d2c 100644 --- a/includes/installer/i18n/qqq.json +++ b/includes/installer/i18n/qqq.json @@ -309,8 +309,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-install-generic": "Shown as a progress message when localisation is not available. Parameter $1 is the internal (English) task name.", |