Html: Don't accept paths relative to skins/common/images/ in infoBox()
authorBartosz Dziewoński <matma.rex@gmail.com>
Fri, 5 Sep 2014 18:17:40 +0000 (20:17 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Mon, 8 Sep 2014 19:03:23 +0000 (21:03 +0200)
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

RELEASE-NOTES-1.24
includes/Html.php
includes/installer/WebInstaller.php

index 3b40a9e..74521c3 100644 (file)
@@ -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().
   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.
   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.
   use this store class.
+* Html::infoBox() no longer accepts paths relative to skins/common/images/.
 
 ==== Renamed classes ====
 * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression
 
 ==== Renamed classes ====
 * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression
index 48dbdba..1e16e39 100644 (file)
@@ -937,20 +937,13 @@ class Html {
         * Get HTML for an info box with an icon.
         *
         * @param string $text Wikitext, get this with wfMessage()->plain()
         * 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 string $alt Alternate text for the icon
         * @param string $class Additional class name to add to the wrapper div
-        * @param bool $useStylePath
         *
         * @return string
         */
         *
         * @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' ) ) .
                $s = Html::openElement( 'div', array( 'class' => "mw-infobox $class" ) );
 
                $s .= Html::openElement( 'div', array( 'class' => 'mw-infobox-left' ) ) .
index 3a3e809..f3dba3a 100644 (file)
@@ -679,7 +679,7 @@ class WebInstaller extends Installer {
                        'images/' . $icon;
                $alt = wfMessage( 'config-information' )->text();
 
                        'images/' . $icon;
                $alt = wfMessage( 'config-information' )->text();
 
-               return Html::infoBox( $text, $icon, $alt, $class, false );
+               return Html::infoBox( $text, $icon, $alt, $class );
        }
 
        /**
        }
 
        /**