From 7f1e4447fbed327f15d2b0be9fdecb4e0afd5e88 Mon Sep 17 00:00:00 2001 From: bwang Date: Fri, 18 Jun 2021 11:19:29 -0500 Subject: [PATCH] Remove deprecated HTML:infoBox Change-Id: I90ce9798be0dbf2fbcb700fe5b735e39508db50e --- RELEASE-NOTES-1.37 | 1 + includes/Html.php | 38 ------------------- .../deprecated/mw-infobox.less | 22 ----------- resources/src/mediawiki.skinning/legacy.less | 8 ---- 4 files changed, 1 insertion(+), 68 deletions(-) delete mode 100644 resources/src/mediawiki.skinning/deprecated/mw-infobox.less diff --git a/RELEASE-NOTES-1.37 b/RELEASE-NOTES-1.37 index 321b0181e64..ec6bb5fa68c 100644 --- a/RELEASE-NOTES-1.37 +++ b/RELEASE-NOTES-1.37 @@ -274,6 +274,7 @@ because of Phabricator reports. * The protected property LocalFile::$metadata was removed without deprecation. * WatchedItem::getUser, hard deprecated since 1.36, has been removed. * AuthManager::singleton, hard deprecated since 1.36, has been removed. +* Html::infobox, deprecated since 1.36, was removed. * … === Deprecations in 1.37 === diff --git a/includes/Html.php b/includes/Html.php index 057395f17eb..3ffea80dcff 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -1011,44 +1011,6 @@ class Html { return (bool)preg_match( '!^(text|application)/xml$|^.+/.+\+xml$!', $mimetype ); } - /** - * Get HTML for an information message box with an icon. - * - * @internal For use by the WebInstaller class only. - * @deprecated since 1.36 - * - * @param string $rawHtml HTML - * @param string $icon Path to icon file (used as 'src' attribute) - * @param string $alt Alternate text for the icon - * @param string $class Additional class name to add to the wrapper div - * @return string HTML - */ - public static function infoBox( $rawHtml, $icon, $alt, $class = '' ) { - wfDeprecated( __METHOD__, '1.36' ); - - $s = self::openElement( 'div', [ 'class' => "mw-infobox $class" ] ); - - $s .= self::openElement( 'div', [ 'class' => 'mw-infobox-left' ] ) . - self::element( 'img', - [ - 'src' => $icon, - 'alt' => $alt, - ] - ) . - self::closeElement( 'div' ); - - $s .= self::openElement( 'div', [ 'class' => 'mw-infobox-right' ] ) . - $rawHtml . - self::closeElement( 'div' ); - $s .= self::element( 'div', [ 'style' => 'clear: left;' ], ' ' ); - - $s .= self::closeElement( 'div' ); - - $s .= self::element( 'div', [ 'style' => 'clear: left;' ], ' ' ); - - return $s; - } - /** * Generate a srcset attribute value. * diff --git a/resources/src/mediawiki.skinning/deprecated/mw-infobox.less b/resources/src/mediawiki.skinning/deprecated/mw-infobox.less deleted file mode 100644 index c37e77bb408..00000000000 --- a/resources/src/mediawiki.skinning/deprecated/mw-infobox.less +++ /dev/null @@ -1,22 +0,0 @@ -/** - * File to be removed in 1.37. - * Rules are duplicated in '/mw-config/config.css', where they are still in use by WebInstaller. - * Add here for skins/extensions that may be using the deprecated `Html::infoBox` method. - */ - -.mw-infobox { - border: 2px solid #fc3; - margin: 0.5em; - clear: left; - overflow: hidden; -} - -.mw-infobox-left { - margin: 7px; - float: left; - width: 35px; -} - -.mw-infobox-right { - margin: 0.5em 0.5em 0.5em 49px; -} diff --git a/resources/src/mediawiki.skinning/legacy.less b/resources/src/mediawiki.skinning/legacy.less index 301b64ce0cd..6020900f946 100644 --- a/resources/src/mediawiki.skinning/legacy.less +++ b/resources/src/mediawiki.skinning/legacy.less @@ -180,14 +180,6 @@ a.new { color: #14866d; } -/** - * `HTML::infobox` `.mw-infobox` class. - * - * Deprecated since 1.36. - */ -// Deprecate on directory base to uniquely mark its status. -@import 'deprecated/mw-infobox.less'; - .visualClear { clear: both; }