$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 )
*/
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 )
[],
$linkRenderer->makeLink( $mimeSearch, $mime )
);
- $row .= Html::element(
+ $row .= Html::rawElement(
'td',
[],
$this->getExtensionList( $mime )
$extArray = explode( ' ', $exts );
$extArray = array_unique( $extArray );
foreach ( $extArray as &$ext ) {
- $ext = '.' . $ext;
+ $ext = htmlspecialchars( '.' . $ext );
}
return $this->getLanguage()->commaList( $extArray );
$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 );
}