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();
|
flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function showSuccess( $msg, ...$params ) {
|
||||||
|
// @phan-suppress-next-line SecurityCheck-XSS
|
||||||
|
echo $this->getMessageText( $msg, $params ) . "\n";
|
||||||
|
flush();
|
||||||
|
}
|
||||||
|
|
||||||
public function showWarning( $msg, ...$params ) {
|
public function showWarning( $msg, ...$params ) {
|
||||||
// @phan-suppress-next-line SecurityCheck-XSS
|
// @phan-suppress-next-line SecurityCheck-XSS
|
||||||
echo $this->getMessageText( $msg, $params ) . "\n";
|
echo $this->getMessageText( $msg, $params ) . "\n";
|
||||||
|
|
|
||||||
|
|
@ -366,6 +366,15 @@ abstract class Installer {
|
||||||
*/
|
*/
|
||||||
abstract public function showMessage( $msg, ...$params );
|
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
|
* Display a warning message
|
||||||
*
|
*
|
||||||
|
|
@ -1770,7 +1779,7 @@ abstract class Installer {
|
||||||
// @phan-suppress-next-next-line PhanPossiblyUndeclaredVariable
|
// @phan-suppress-next-next-line PhanPossiblyUndeclaredVariable
|
||||||
// $steps has at least one element and that defines $status
|
// $steps has at least one element and that defines $status
|
||||||
if ( $status->isOK() ) {
|
if ( $status->isOK() ) {
|
||||||
$this->showMessage(
|
$this->showSuccess(
|
||||||
'config-install-db-success'
|
'config-install-db-success'
|
||||||
);
|
);
|
||||||
$this->setVar( '_InstallDone', true );
|
$this->setVar( '_InstallDone', true );
|
||||||
|
|
|
||||||
|
|
@ -677,6 +677,14 @@ class WebInstaller extends Installer {
|
||||||
"</div></div>\n";
|
"</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 ) {
|
public function showMessage( $msg, ...$params ) {
|
||||||
$html = '<div class="cdx-message cdx-message--block cdx-message--notice">' .
|
$html = '<div class="cdx-message cdx-message--block cdx-message--notice">' .
|
||||||
'<span class="cdx-message__icon"></span><div class="cdx-message__content">' .
|
'<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';
|
$msg = 'config-upgrade-done-no-regenerate';
|
||||||
}
|
}
|
||||||
$this->parent->disableLinkPopups();
|
$this->parent->disableLinkPopups();
|
||||||
$this->addHTML(
|
$this->parent->showSuccess(
|
||||||
$this->parent->getInfoBox(
|
$msg,
|
||||||
wfMessage( $msg,
|
$this->getVar( 'wgServer' ) . $this->getVar( 'wgScriptPath' ) . '/index.php'
|
||||||
$this->getVar( 'wgServer' ) .
|
|
||||||
$this->getVar( 'wgScriptPath' ) . '/index.php'
|
|
||||||
)->plain()
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
$this->parent->restoreLinkPopups();
|
$this->parent->restoreLinkPopups();
|
||||||
$this->endForm( $regenerate ? 'regenerate' : false, false );
|
$this->endForm( $regenerate ? 'regenerate' : false, false );
|
||||||
|
|
|
||||||
|
|
@ -36,10 +36,7 @@ class WebInstallerWelcome extends WebInstallerPage {
|
||||||
$this->parent->output->addWikiTextAsInterface( wfMessage( 'config-welcome' )->plain() );
|
$this->parent->output->addWikiTextAsInterface( wfMessage( 'config-welcome' )->plain() );
|
||||||
$status = $this->parent->doEnvironmentChecks();
|
$status = $this->parent->doEnvironmentChecks();
|
||||||
if ( $status->isGood() ) {
|
if ( $status->isGood() ) {
|
||||||
$this->parent->output->addHTML(
|
$this->parent->showSuccess( 'config-env-good' );
|
||||||
'<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->output->addWikiTextAsInterface(
|
$this->parent->output->addWikiTextAsInterface(
|
||||||
wfMessage( 'config-welcome-section-copyright',
|
wfMessage( 'config-welcome-section-copyright',
|
||||||
SpecialVersion::getCopyrightAndAuthorList(),
|
SpecialVersion::getCopyrightAndAuthorList(),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue