X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Finstaller%2FWebInstaller.php;h=d9cd6dea82dec0e1824930f29adf59bffb055b71;hp=b6e90a9b457d55657c0cc85a251be024319565b3;hb=fa0f6f34972c0e0f4aac24a03b3efdfc45f256f6;hpb=cb5acb42ce62b2d600dfb4e11a2982602b670a2f diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index b6e90a9b45..d9cd6dea82 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -390,7 +390,8 @@ class WebInstaller extends Installer { ); } $text = $msg->useDatabase( false )->plain(); - $this->output->addHTML( $this->getErrorBox( $text ) ); + $box = Html::errorBox( $text, '', 'config-error-box' ); + $this->output->addHTML( $box ); } /** @@ -637,34 +638,40 @@ class WebInstaller extends Installer { /** * Get HTML for an error box with an icon. * + * @deprecated since 1.34 Use Html::errorBox() instead. * @param string $text Wikitext, get this with wfMessage()->plain() * * @return string */ public function getErrorBox( $text ) { + wfDeprecated( __METHOD__, '1.34' ); return $this->getInfoBox( $text, 'critical-32.png', 'config-error-box' ); } /** * Get HTML for a warning box with an icon. * + * @deprecated since 1.34 Use Html::warningBox() instead. * @param string $text Wikitext, get this with wfMessage()->plain() * * @return string */ public function getWarningBox( $text ) { + wfDeprecated( __METHOD__, '1.34' ); return $this->getInfoBox( $text, 'warning-32.png', 'config-warning-box' ); } /** * Get HTML for an information message box with an icon. * + * @deprecated since 1.34. * @param string|HtmlArmor $text Wikitext to be parsed (from Message::plain) or raw HTML. * @param string|bool $icon Icon name, file in mw-config/images. Default: false * @param string|bool $class Additional class name to add to the wrapper div. Default: false. * @return string HTML */ public function getInfoBox( $text, $icon = false, $class = false ) { + wfDeprecated( __METHOD__, '1.34' ); $html = ( $text instanceof HtmlArmor ) ? HtmlArmor::getHtml( $text ) : $this->parse( $text, true ); @@ -1046,9 +1053,9 @@ class WebInstaller extends Installer { $text = $status->getWikiText(); if ( $status->isOK() ) { - $box = $this->getWarningBox( $text ); + $box = Html::warningBox( $text, 'config-warning-box' ); } else { - $box = $this->getErrorBox( $text ); + $box = Html::errorBox( $text, '', 'config-error-box' ); } $this->output->addHTML( $box );