Merge "xhprof: Guard against division by 0 when computing percentages"
[lhc/web/wiklou.git] / includes / specials / SpecialMediaStatistics.php
index 3fd8413..c26adc5 100644 (file)
@@ -99,7 +99,7 @@ class MediaStatisticsPage extends QueryPage {
         *
         * @param $out OutputPage
         * @param $skin Skin (deprecated presumably)
-        * @param $dbr DatabaseBase
+        * @param $dbr IDatabase
         * @param $res ResultWrapper Results from query
         * @param $num integer Number of results
         * @param $offset integer Paging offset (Should always be 0 in our case)
@@ -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 */
@@ -313,7 +314,7 @@ class MediaStatisticsPage extends QueryPage {
        /**
         * Initialize total values so we can figure out percentages later.
         *
-        * @param $dbr DatabaseBase
+        * @param $dbr IDatabase
         * @param $res ResultWrapper
         */
        public function preprocessResults( $dbr, $res ) {