Merge "Expose the latest modified index seen by EtcdConfig"
[lhc/web/wiklou.git] / includes / specials / SpecialMediaStatistics.php
index 9e07523..15749b2 100644 (file)
@@ -30,13 +30,15 @@ use Wikimedia\Rdbms\IDatabase;
  */
 class MediaStatisticsPage extends QueryPage {
        protected $totalCount = 0, $totalBytes = 0;
+
        /**
-       * @var integer $totalPerType Combined file size of all files in a section
-       */
+        * @var int $totalPerType Combined file size of all files in a section
+        */
        protected $totalPerType = 0;
+
        /**
-       * @var integer $totalSize Combined file size of all files
-       */
+        * @var int $totalSize Combined file size of all files
+        */
        protected $totalSize = 0;
 
        function __construct( $name = 'MediaStatistics' ) {
@@ -198,7 +200,7 @@ class MediaStatisticsPage extends QueryPage {
                $row .= Html::rawElement(
                        'td',
                        // Make sure js sorts it in numeric order
-                       [ 'data-sort-value' =>  $bytes ],
+                       [ 'data-sort-value' => $bytes ],
                        $this->msg( 'mediastatistics-nbytes' )
                                ->numParams( $bytes )
                                ->sizeParams( $bytes )
@@ -235,7 +237,8 @@ class MediaStatisticsPage extends QueryPage {
         * @return string Comma separated list of allowed extensions (e.g. ".ogg, .oga")
         */
        private function getExtensionList( $mime ) {
-               $exts = MimeMagic::singleton()->getExtensionsForType( $mime );
+               $exts = MediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer()
+                       ->getExtensionsForType( $mime );
                if ( $exts === null ) {
                        return '';
                }