X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Finstaller%2FWebInstaller.php;h=e8433f2a97764b2d5b6357a987212301fea04cf1;hb=adb0c734befa5aff7362bbbc010785af40e543a2;hp=9edc25a709efb48d8635e1e87a69ab589058336a;hpb=5ad8f11baf52c1dbfbc19371647be775e0db6e74;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 9edc25a709..e8433f2a97 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -386,15 +386,19 @@ class WebInstaller extends Installer { } /** - * Show an error message in a box. Parameters are like wfMessage(). - * @param string $msg + * Show an error message in a box. Parameters are like wfMessage(), or + * alternatively, pass a Message object in. + * @param string|Message $msg */ public function showError( $msg /*...*/ ) { - $args = func_get_args(); - array_shift( $args ); - $args = array_map( 'htmlspecialchars', $args ); - $msg = wfMessage( $msg, $args )->useDatabase( false )->plain(); - $this->output->addHTML( $this->getErrorBox( $msg ) ); + if ( !( $msg instanceof Message ) ) { + $args = func_get_args(); + array_shift( $args ); + $args = array_map( 'htmlspecialchars', $args ); + $msg = wfMessage( $msg, $args ); + } + $text = $msg->useDatabase( false )->plain(); + $this->output->addHTML( $this->getErrorBox( $text ) ); } /**