SpecialMediaStatistics: Add <thead> and <tbody> in the table
authorFomafix <fomafix@googlemail.com>
Sat, 29 Dec 2018 21:16:36 +0000 (22:16 +0100)
committerFomafix <fomafix@googlemail.com>
Sun, 30 Dec 2018 20:47:10 +0000 (21:47 +0100)
This avoids that jquery.tablesorter has to add the elements.

Change-Id: Iab7baa641113552720df022cd05d7c4970b4a886

includes/specials/SpecialMediaStatistics.php

index e591da0..873decb 100644 (file)
@@ -156,7 +156,10 @@ class MediaStatisticsPage extends QueryPage {
         * Output closing </table>
         */
        protected function outputTableEnd() {
-               $this->getOutput()->addHTML( Html::closeElement( 'table' ) );
+               $this->getOutput()->addHTML(
+                       Html::closeElement( 'tbody' ) .
+                       Html::closeElement( 'table' )
+               );
                $this->getOutput()->addWikiTextAsInterface(
                                $this->msg( 'mediastatistics-bytespertype' )
                                        ->numParams( $this->totalPerType )
@@ -267,9 +270,10 @@ class MediaStatisticsPage extends QueryPage {
                                        'sortable',
                                        'wikitable'
                                ] ]
-                       )
+                       ) .
+                       Html::rawElement( 'thead', [], $this->getTableHeaderRow() ) .
+                       Html::openElement( 'tbody' )
                );
-               $this->getOutput()->addHTML( $this->getTableHeaderRow() );
        }
 
        /**