r108020 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108019‎ | r108020 | r108021 >
Date:13:03, 4 January 2012
Author:nikerabbit
Status:ok (Comments)
Tags:
Comment:
Add the totals row to <tfoot> to exclude it from sorting. Requested by Siebrand and fix suggested by Amir.
Modified paths:
  • /trunk/extensions/Translate/specials/SpecialLanguageStats.php (modified) (history)
  • /trunk/extensions/Translate/specials/SpecialMessageGroupStats.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/specials/SpecialMessageGroupStats.php
@@ -130,8 +130,10 @@
131131 if ( $out ) {
132132 $table->setMainColumnHeader( wfMessage( 'translate-mgs-column-language' ) );
133133 $out = $table->createHeader() . "\n" . $out;
 134+ $out .= Html::closeElement( 'tbody' );
 135+ $out .= '<tfoot>';
134136 $out .= $table->makeTotalRow( wfMessage( 'translate-mgs-totals' ), $this->totals );
135 - $out .= Html::closeElement( 'tbody' );
 137+ $out .= '</tfoot>';
136138 $out .= Html::closeElement( 'table' );
137139 return $out;
138140 } else {
Index: trunk/extensions/Translate/specials/SpecialLanguageStats.php
@@ -289,7 +289,9 @@
290290 if ( $out ) {
291291 $table->setMainColumnHeader( wfMessage( 'translate-ls-column-group' ) );
292292 $out = $table->createHeader() . "\n" . $out;
 293+ $out .= '<tfoot>';
293294 $out .= $table->makeTotalRow( wfMessage( 'translate-languagestats-overall' ), $this->totals );
 295+ $out .= '</tfoot>';
294296 $out .= Html::closeElement( 'tbody' );
295297 $out .= Html::closeElement( 'table' );
296298 return $out;

Follow-up revisions

RevisionCommit summaryAuthorDate
r108047Added Html::openElement/closeElement and moved <tbody> before <tfoot> (thank ...amire8016:20, 4 January 2012
r108947fixed portability issue for running testsoren01:46, 15 January 2012

Comments

#Comment by Santhosh.thottingal (talk | contribs)   14:10, 4 January 2012

Why not Html::openElement( 'tfoot' ), closeElement( 'tfoot' )?

#Comment by Nikerabbit (talk | contribs)   15:19, 4 January 2012

/me lazy. Feel free to change.

#Comment by Amire80 (talk | contribs)   16:21, 4 January 2012

Addressed in r108047.

Status & tagging log