Drop Linker::formatSize, deprecated in 1.28 and unused
authorJames D. Forrester <jforrester@wikimedia.org>
Sat, 9 Feb 2019 01:31:29 +0000 (17:31 -0800)
committerJames D. Forrester <jforrester@wikimedia.org>
Sat, 9 Feb 2019 01:43:33 +0000 (17:43 -0800)
Change-Id: Id119e9f3ff0d27b59654876bad9212cc0f3c5a2d

RELEASE-NOTES-1.33
includes/DummyLinker.php
includes/Linker.php
includes/page/ImagePage.php

index e725198..f97539b 100644 (file)
@@ -209,6 +209,8 @@ because of Phabricator reports.
 * SiteSQLStore, deprecated in 1.27 and whose only method, ::newInstance(),
   would return the global SiteStore instance, has been removed. You can get to
   this via MediaWiki\MediaWikiServices::getInstance()->getSiteStore() directly.
+* Linker::formatSize, deprecated in 1.28, has been removed (with DummyLinker's).
+  Instead, use Language->formatSize() with the relevant Language object.
 
 === Deprecations in 1.33 ===
 * The configuration option $wgUseESI has been deprecated, and is expected
index ba1233e..be2d90b 100644 (file)
@@ -426,15 +426,6 @@ class DummyLinker {
                return Linker::formatHiddenCategories( $hiddencats );
        }
 
-       /**
-        * @deprecated since 1.28, use Language::formatSize() directly
-        */
-       public function formatSize( $size ) {
-               wfDeprecated( __METHOD__, '1.28' );
-
-               return Linker::formatSize( $size );
-       }
-
        public function titleAttrib( $name, $options = null, array $msgParams = [] ) {
                return Linker::titleAttrib(
                        $name,
index d1434f8..b54723a 100644 (file)
@@ -1963,23 +1963,6 @@ class Linker {
                return $outText;
        }
 
-       /**
-        * @deprecated since 1.28, use Language::formatSize() directly
-        *
-        * Format a size in bytes for output, using an appropriate
-        * unit (B, KB, MB or GB) according to the magnitude in question
-        *
-        * @since 1.16.3
-        * @param int $size Size to format
-        * @return string
-        */
-       public static function formatSize( $size ) {
-               wfDeprecated( __METHOD__, '1.28' );
-
-               global $wgLang;
-               return htmlspecialchars( $wgLang->formatSize( $size ) );
-       }
-
        /**
         * Given the id of an interface element, constructs the appropriate title
         * attribute from the system messages.  (Note, this is usually the id but
index 76b2de0..66804bc 100644 (file)
@@ -357,7 +357,7 @@ class ImagePage extends Article {
                                # image
                                # "Download high res version" link below the image
                                # $msgsize = $this->getContext()->msg( 'file-info-size', $width_orig, $height_orig,
-                               #   Linker::formatSize( $this->displayImg->getSize() ), $mime )->escaped();
+                               #   Language::formatSize( $this->displayImg->getSize() ), $mime )->escaped();
                                # We'll show a thumbnail of this image
                                if ( $width > $maxWidth || $height > $maxHeight || $this->displayImg->isVectorized() ) {
                                        list( $width, $height ) = $this->getDisplayWidthHeight(