*
* 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' ];
$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 )
/**
* @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;
$extArray = explode( ' ', $exts );
$extArray = array_unique( $extArray );
foreach ( $extArray as &$ext ) {
- $ext = '.' . $ext;
+ $ext = htmlspecialchars( '.' . $ext );
}
return $this->getLanguage()->commaList( $extArray );
/**
* 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' ];