r77839 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77838‎ | r77839 | r77840 >
Date:22:49, 5 December 2010
Author:reedy
Status:ok
Tags:
Comment:
abstract class SvnTablePager extends TablePager

SvnRevTablePager extends SvnTablePager

Why is formatRow in SvnRevTablePager exactly the same?
Modified paths:
  • /trunk/extensions/CodeReview/ui/CodeRevisionListView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/ui/CodeRevisionListView.php
@@ -358,30 +358,6 @@
359359 }
360360 }
361361
362 - // Note: this function is poorly factored in the parent class
363 - function formatRow( $row ) {
364 - global $wgWikiSVN;
365 - $css = "mw-codereview-status-{$row->cr_status}";
366 - if ( $this->mRepo->getName() == $wgWikiSVN ) {
367 - $css .= " mw-codereview-" . ( $row-> { $this->getDefaultSort() } <= $this->mCurSVN ? 'live' : 'notlive' );
368 - }
369 - $s = "<tr class=\"$css\">\n";
370 - // Some of this stolen from Pager.php...sigh
371 - $fieldNames = $this->getFieldNames();
372 - $this->mCurrentRow = $row; # In case formatValue needs to know
373 - foreach ( $fieldNames as $field => $name ) {
374 - $value = isset( $row->$field ) ? $row->$field : null;
375 - $formatted = strval( $this->formatRevValue( $field, $value, $row ) );
376 - if ( $formatted == '' ) {
377 - $formatted = '&#160;';
378 - }
379 - $class = 'TablePager_col_' . htmlspecialchars( $field );
380 - $s .= "<td class=\"$class\">$formatted</td>\n";
381 - }
382 - $s .= "</tr>\n";
383 - return $s;
384 - }
385 -
386362 function getTitle() {
387363 return SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() );
388364 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r77840Followup r77839, isFieldSortable is exactly the same too...reedy22:51, 5 December 2010
r77935Revert r77839, tiny subtle change is subtle...reedy00:31, 7 December 2010
r77937Technically reverting r77935, making r77839 live again (Confusing, eh? Good j...reedy00:50, 7 December 2010

Status & tagging log