X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialMediaStatistics.php;h=b6812bca6b26853665b7e3251b4c6e34a0f71c83;hb=c0ed2620535b798f2826fecc4ee998380209be5d;hp=943fa57062fa41fe6d220b6a0e2054bf99fe7933;hpb=0eb1619898438735b04293b5aef9a36650258741;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialMediaStatistics.php b/includes/specials/SpecialMediaStatistics.php index 943fa57062..b6812bca6b 100644 --- a/includes/specials/SpecialMediaStatistics.php +++ b/includes/specials/SpecialMediaStatistics.php @@ -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 ) @@ -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 ); @@ -363,8 +363,8 @@ class MediaStatisticsPage extends QueryPage { $this->totalCount = $this->totalBytes = 0; foreach ( $res as $row ) { $mediaStats = $this->splitFakeTitle( $row->title ); - $this->totalCount += isset( $mediaStats[2] ) ? $mediaStats[2] : 0; - $this->totalBytes += isset( $mediaStats[3] ) ? $mediaStats[3] : 0; + $this->totalCount += $mediaStats[2] ?? 0; + $this->totalBytes += $mediaStats[3] ?? 0; } $res->seek( 0 ); }