}
/**
- * Output an error box using a Status object
+ * Output an error or warning box using a Status object
*/
- function showStatusErrorBox( $status ) {
- $text = $status->getWikiText();
- $this->output->addHTML( $this->getErrorBox( $text ) );
+ function showStatusBox( $status ) {
+ if( !$status->isGood() ) {
+ $text = $status->getWikiText();
+ if( $status->isOk() ) {
+ $box = $this->getWarningBox( $text );
+ } else {
+ $box = $this->getErrorBox( $text );
+ }
+ $this->output->addHTML( $box );
+ }
}
function showStatusMessage( $status ) {
$this->setVar( '_UpgradeDone', false );
return 'continue';
} else {
- $this->parent->showStatusErrorBox( $status );
+ $this->parent->showStatusBox( $status );
}
}
} elseif ( $status->isGood() ) {
return 'continue';
} else {
- $this->parent->showStatusErrorBox( $status );
+ $this->parent->showStatusBox( $status );
}
}
$ok = $status->isGood();
if ( !$ok ) {
- $this->parent->showStatusErrorBox( $status );
+ $this->parent->showStatusBox( $status );
}
$this->endStage( $ok );
}