Special:MediaStatistics: data-sort-value also for number of files
authorumherirrender <umherirrender_de.wp@web.de>
Thu, 2 Oct 2014 20:20:55 +0000 (22:20 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Thu, 2 Oct 2014 20:20:55 +0000 (22:20 +0200)
The column "Number of files" is sortable, but does not contains plain
numbers, so it needs a data-sort-value to allow js to sort correct.

Change-Id: I9b7232b755dc8dab2cf04682103085273dada737

includes/specials/SpecialMediaStatistics.php

index 3fd8413..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 */