We probably want to put errors on top in the web installer
and warnings on top in the CLI installer due to differences
in scrolling.
This reverts commit
1c1e321af7977722073116fb6846f494502f6805.
Change-Id: I247030f0a3da6dff44884f4a282e52e92657fd91
public function showHelpBox( $msg /*, ... */ ) {
}
- /**
- * @param Status $status
- */
public function showStatusMessage( Status $status ) {
- parent::showStatusMessage( $status );
+ $warnings = array_merge( $status->getWarningsArray(),
+ $status->getErrorsArray() );
+
+ if ( count( $warnings ) !== 0 ) {
+ foreach ( $warnings as $w ) {
+ call_user_func_array( array( $this, 'showMessage' ), $w );
+ }
+ }
+
if ( !$status->isOk() ) {
echo "\n";
exit( 1 );
abstract public function showError( $msg /*, ... */ );
/**
- * Shows messages to the user through a Status object
+ * Show a message to the installing user by using a Status object
* @param Status $status
*/
- public function showStatusMessage( Status $status ) {
- $errors = array_merge( $status->getErrorsArray(), $status->getWarningsArray() );
- if ( $errors ) {
- foreach ( $errors as $error ) {
- call_user_func( 'showMessage', $error );
- }
- }
- }
+ abstract public function showStatusMessage( Status $status );
/**
* Constructor, always call this from child classes.
$this->output->addHTML( $html );
}
+ /**
+ * @param Status $status
+ */
+ public function showStatusMessage( Status $status ) {
+ $errors = array_merge( $status->getErrorsArray(), $status->getWarningsArray() );
+ foreach ( $errors as $error ) {
+ call_user_func_array( array( $this, 'showMessage' ), $error );
+ }
+ }
+
/**
* Label a control by wrapping a config-input div around it and putting a
* label before it.