installer: Use StatusValue::getMessages() instead of deprecated methods
Add a comment to better explain why both of these methods exist. Change-Id: If280283b8f263bca347ee36209674d04d9cc5881
This commit is contained in:
parent
1a7f3571e7
commit
f89c9bfba7
2 changed files with 12 additions and 10 deletions
|
|
@ -289,13 +289,12 @@ class CliInstaller extends Installer {
|
|||
}
|
||||
|
||||
public function showStatusMessage( Status $status ) {
|
||||
$warnings = array_merge( $status->getWarningsArray(),
|
||||
$status->getErrorsArray() );
|
||||
|
||||
if ( count( $warnings ) !== 0 ) {
|
||||
foreach ( $warnings as $w ) {
|
||||
$this->showMessage( ...$w );
|
||||
}
|
||||
// Show errors at the end in CLI installer to make them easier to notice
|
||||
foreach ( $status->getMessages( 'warning' ) as $msg ) {
|
||||
$this->showMessage( $msg );
|
||||
}
|
||||
foreach ( $status->getMessages( 'error' ) as $msg ) {
|
||||
$this->showMessage( $msg );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -686,9 +686,12 @@ class WebInstaller extends Installer {
|
|||
}
|
||||
|
||||
public function showStatusMessage( Status $status ) {
|
||||
$errors = array_merge( $status->getErrorsArray(), $status->getWarningsArray() );
|
||||
foreach ( $errors as $error ) {
|
||||
$this->showMessage( ...$error );
|
||||
// Show errors at the top in web installer to make them easier to notice
|
||||
foreach ( $status->getMessages( 'error' ) as $msg ) {
|
||||
$this->showMessage( $msg );
|
||||
}
|
||||
foreach ( $status->getMessages( 'warning' ) as $msg ) {
|
||||
$this->showMessage( $msg );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue