Merge "Remove negative caching from Revision::getContentInternal"
[lhc/web/wiklou.git] / includes / specials / SpecialMediaStatistics.php
index 681c332..1084482 100644 (file)
@@ -153,7 +153,8 @@ class MediaStatisticsPage extends QueryPage {
                );
                $row .= Html::rawElement(
                        'td',
-                       array(),
+                       // Make sure js sorts it in numeric order
+                       array( 'data-sort-value' => $count ),
                        $this->msg( 'mediastatistics-nfiles' )
                                ->numParams( $count )
                                /** @todo Check to be sure this really should have number formatting */
@@ -185,6 +186,9 @@ class MediaStatisticsPage extends QueryPage {
                if ( $decimal == 0 ) {
                        return '0';
                }
+               if ( $decimal >= 100 ) {
+                       return '100';
+               }
                $percent = sprintf( "%." . max( 0, 2 - floor( log10( $decimal ) ) ) . "f", $decimal );
                // Then remove any trailing 0's
                return preg_replace( '/\.?0*$/', '', $percent );