installer: Restore success messages
Bug: T384524 Change-Id: I688e310ab08d4fb83d5dc47bd1fa79617cead9d3 (cherry picked from commit 379d3842bd4fcc2bd0587ea85a81bb68ed5a285a)
This commit is contained in:
parent
398fdb85b8
commit
6ea3f2f4f5
5 changed files with 28 additions and 12 deletions
|
|
@ -262,6 +262,12 @@ class CliInstaller extends Installer {
|
|||
flush();
|
||||
}
|
||||
|
||||
public function showSuccess( $msg, ...$params ) {
|
||||
// @phan-suppress-next-line SecurityCheck-XSS
|
||||
echo $this->getMessageText( $msg, $params ) . "\n";
|
||||
flush();
|
||||
}
|
||||
|
||||
public function showWarning( $msg, ...$params ) {
|
||||
// @phan-suppress-next-line SecurityCheck-XSS
|
||||
echo $this->getMessageText( $msg, $params ) . "\n";
|
||||
|
|
|
|||
|
|
@ -366,6 +366,15 @@ abstract class Installer {
|
|||
*/
|
||||
abstract public function showMessage( $msg, ...$params );
|
||||
|
||||
/**
|
||||
* Display a success message
|
||||
*
|
||||
* @param string|MessageSpecifier $msg String of wikitext that will be converted
|
||||
* to HTML, or interface message that will be parsed.
|
||||
* @param string|int|float ...$params Message parameters, same as wfMessage().
|
||||
*/
|
||||
abstract public function showSuccess( $msg, ...$params );
|
||||
|
||||
/**
|
||||
* Display a warning message
|
||||
*
|
||||
|
|
@ -1770,7 +1779,7 @@ abstract class Installer {
|
|||
// @phan-suppress-next-next-line PhanPossiblyUndeclaredVariable
|
||||
// $steps has at least one element and that defines $status
|
||||
if ( $status->isOK() ) {
|
||||
$this->showMessage(
|
||||
$this->showSuccess(
|
||||
'config-install-db-success'
|
||||
);
|
||||
$this->setVar( '_InstallDone', true );
|
||||
|
|
|
|||
|
|
@ -677,6 +677,14 @@ class WebInstaller extends Installer {
|
|||
"</div></div>\n";
|
||||
}
|
||||
|
||||
public function showSuccess( $msg, ...$params ) {
|
||||
$html = '<div class="cdx-message cdx-message--block cdx-message--success">' .
|
||||
'<span class="cdx-message__icon"></span><div class="cdx-message__content">' .
|
||||
$this->parse( wfMessage( $msg, $params )->useDatabase( false )->plain() ) .
|
||||
"</div></div>\n";
|
||||
$this->output->addHTML( $html );
|
||||
}
|
||||
|
||||
public function showMessage( $msg, ...$params ) {
|
||||
$html = '<div class="cdx-message cdx-message--block cdx-message--notice">' .
|
||||
'<span class="cdx-message__icon"></span><div class="cdx-message__content">' .
|
||||
|
|
|
|||
|
|
@ -87,13 +87,9 @@ class WebInstallerUpgrade extends WebInstallerPage {
|
|||
$msg = 'config-upgrade-done-no-regenerate';
|
||||
}
|
||||
$this->parent->disableLinkPopups();
|
||||
$this->addHTML(
|
||||
$this->parent->getInfoBox(
|
||||
wfMessage( $msg,
|
||||
$this->getVar( 'wgServer' ) .
|
||||
$this->getVar( 'wgScriptPath' ) . '/index.php'
|
||||
)->plain()
|
||||
)
|
||||
$this->parent->showSuccess(
|
||||
$msg,
|
||||
$this->getVar( 'wgServer' ) . $this->getVar( 'wgScriptPath' ) . '/index.php'
|
||||
);
|
||||
$this->parent->restoreLinkPopups();
|
||||
$this->endForm( $regenerate ? 'regenerate' : false, false );
|
||||
|
|
|
|||
|
|
@ -36,10 +36,7 @@ class WebInstallerWelcome extends WebInstallerPage {
|
|||
$this->parent->output->addWikiTextAsInterface( wfMessage( 'config-welcome' )->plain() );
|
||||
$status = $this->parent->doEnvironmentChecks();
|
||||
if ( $status->isGood() ) {
|
||||
$this->parent->output->addHTML(
|
||||
'<div class="cdx-message cdx-message--block cdx-message--success">' .
|
||||
'<span class="cdx-message__icon"></span> <div class="cdx-message__content">' .
|
||||
wfMessage( 'config-env-good' )->escaped() . '</div></div>' );
|
||||
$this->parent->showSuccess( 'config-env-good' );
|
||||
$this->parent->output->addWikiTextAsInterface(
|
||||
wfMessage( 'config-welcome-section-copyright',
|
||||
SpecialVersion::getCopyrightAndAuthorList(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue