Merge "SpecialUnusedimages: Change message when CountCategorizedImagesAsUsed"
[lhc/web/wiklou.git] / includes / specials / SpecialMediaStatistics.php
index 26c9b06..e591da0 100644 (file)
@@ -102,7 +102,7 @@ class MediaStatisticsPage extends QueryPage {
         *
         * It's important that img_media_type come first, otherwise the
         * tables will be fragmented.
-        * @return Array Fields to sort by
+        * @return array Fields to sort by
         */
        function getOrderFields() {
                return [ 'img_media_type', 'count(*)', 'img_major_mime', 'img_minor_mime' ];
@@ -143,7 +143,7 @@ class MediaStatisticsPage extends QueryPage {
                        $this->outputTableEnd();
                        // add total size of all files
                        $this->outputMediaType( 'total' );
-                       $this->getOutput()->addWikiText(
+                       $this->getOutput()->addWikiTextAsInterface(
                                $this->msg( 'mediastatistics-allbytes' )
                                        ->numParams( $this->totalSize )
                                        ->sizeParams( $this->totalSize )
@@ -157,7 +157,7 @@ class MediaStatisticsPage extends QueryPage {
         */
        protected function outputTableEnd() {
                $this->getOutput()->addHTML( Html::closeElement( 'table' ) );
-               $this->getOutput()->addWikiText(
+               $this->getOutput()->addWikiTextAsInterface(
                                $this->msg( 'mediastatistics-bytespertype' )
                                        ->numParams( $this->totalPerType )
                                        ->sizeParams( $this->totalPerType )
@@ -182,7 +182,7 @@ class MediaStatisticsPage extends QueryPage {
                        [],
                        $linkRenderer->makeLink( $mimeSearch, $mime )
                );
-               $row .= Html::element(
+               $row .= Html::rawElement(
                        'td',
                        [],
                        $this->getExtensionList( $mime )
@@ -214,7 +214,7 @@ class MediaStatisticsPage extends QueryPage {
 
        /**
         * @param float $decimal A decimal percentage (ie for 12.3%, this would be 0.123)
-        * @return String The percentage formatted so that 3 significant digits are shown.
+        * @return string The percentage formatted so that 3 significant digits are shown.
         */
        protected function makePercentPretty( $decimal ) {
                $decimal *= 100;
@@ -245,7 +245,7 @@ class MediaStatisticsPage extends QueryPage {
                $extArray = explode( ' ', $exts );
                $extArray = array_unique( $extArray );
                foreach ( $extArray as &$ext ) {
-                       $ext = '.' . $ext;
+                       $ext = htmlspecialchars( '.' . $ext );
                }
 
                return $this->getLanguage()->commaList( $extArray );
@@ -275,7 +275,7 @@ class MediaStatisticsPage extends QueryPage {
        /**
         * Get (not output) the header row for the table
         *
-        * @return String the header row of the able
+        * @return string The header row of the table
         */
        protected function getTableHeaderRow() {
                $headers = [ 'mimetype', 'extensions', 'count', 'totalbytes' ];