From: Bartosz DziewoƄski Date: Fri, 5 Sep 2014 18:17:40 +0000 (+0200) Subject: Html: Don't accept paths relative to skins/common/images/ in infoBox() X-Git-Tag: 1.31.0-rc.0~14111^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=6ff6ded2fc0fa8ddb653a53415b9a436637e0aa2;p=lhc%2Fweb%2Fwiklou.git Html: Don't accept paths relative to skins/common/images/ in infoBox() There are no files worth referencing there anymore. No usages found in extensions, only one usage in core already didn't depend on that behavior. Change-Id: If1fd68a3a7355c8195fd2aad86e7584a5772bd4c --- diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index 3b40a9e062..74521c3f17 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -449,10 +449,11 @@ changes to languages because of Bugzilla reports. called unconditionally. * TablePager::getBody() is now 'final' and can't be overridden in subclasses. * TablePager::getBody() is deprecated, use getBodyOutput() or getFullOutput(). -* log_page for move log entries store the original page ID, rather than that +* log_page for move log entries store the original page ID, rather than that of the new redirect page. This is not retroactive. -* LCStoreAccel was removed. $wgLocalisationCacheConf can no longer be set to +* LCStoreAccel was removed. $wgLocalisationCacheConf can no longer be set to use this store class. +* Html::infoBox() no longer accepts paths relative to skins/common/images/. ==== Renamed classes ==== * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression diff --git a/includes/Html.php b/includes/Html.php index 48dbdba691..1e16e39430 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -937,20 +937,13 @@ class Html { * Get HTML for an info box with an icon. * * @param string $text Wikitext, get this with wfMessage()->plain() - * @param string $icon Icon name, file in skins/common/images + * @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 - * @param bool $useStylePath * * @return string */ - static function infoBox( $text, $icon, $alt, $class = false, $useStylePath = true ) { - global $wgStylePath; - - if ( $useStylePath ) { - $icon = $wgStylePath . '/common/images/' . $icon; - } - + static function infoBox( $text, $icon, $alt, $class = false ) { $s = Html::openElement( 'div', array( 'class' => "mw-infobox $class" ) ); $s .= Html::openElement( 'div', array( 'class' => 'mw-infobox-left' ) ) . diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 3a3e809cc6..f3dba3a72d 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -679,7 +679,7 @@ class WebInstaller extends Installer { 'images/' . $icon; $alt = wfMessage( 'config-information' )->text(); - return Html::infoBox( $text, $icon, $alt, $class, false ); + return Html::infoBox( $text, $icon, $alt, $class ); } /**