Index: trunk/extensions/CodeReview/ui/SpecialCode.php |
— | — | @@ -226,6 +226,10 @@ |
227 | 227 | return $field == $this->getDefaultSort(); |
228 | 228 | } |
229 | 229 | |
| 230 | + function formatRevValue( $name, $value, $row ) { |
| 231 | + return $this->formatValue( $name, $value ); |
| 232 | + } |
| 233 | + |
230 | 234 | // Note: this function is poorly factored in the parent class |
231 | 235 | function formatRow( $row ) { |
232 | 236 | $css = "mw-codereview-status-{$row->cr_status}"; |
— | — | @@ -235,7 +239,7 @@ |
236 | 240 | $this->mCurrentRow = $row; # In case formatValue needs to know |
237 | 241 | foreach ( $fieldNames as $field => $name ) { |
238 | 242 | $value = isset( $row->$field ) ? $row->$field : null; |
239 | | - $formatted = strval( $this->formatValue( $field, $value ) ); |
| 243 | + $formatted = strval( $this->formatRevValue( $field, $value, $row ) ); |
240 | 244 | if ( $formatted == '' ) { |
241 | 245 | $formatted = ' '; |
242 | 246 | } |
Index: trunk/extensions/CodeReview/ui/CodeRevisionListView.php |
— | — | @@ -354,27 +354,6 @@ |
355 | 355 | } |
356 | 356 | } |
357 | 357 | |
358 | | - // Note: this function is poorly factored in the parent class |
359 | | - function formatRow( $row ) { |
360 | | - global $wgWikiSVN; |
361 | | - $css = "mw-codereview-status-{$row->cr_status}"; |
362 | | - $s = "<tr class=\"$css\">\n"; |
363 | | - // Some of this stolen from Pager.php...sigh |
364 | | - $fieldNames = $this->getFieldNames(); |
365 | | - $this->mCurrentRow = $row; # In case formatValue needs to know |
366 | | - foreach ( $fieldNames as $field => $name ) { |
367 | | - $value = isset( $row->$field ) ? $row->$field : null; |
368 | | - $formatted = strval( $this->formatRevValue( $field, $value, $row ) ); |
369 | | - if ( $formatted == '' ) { |
370 | | - $formatted = ' '; |
371 | | - } |
372 | | - $class = 'TablePager_col_' . htmlspecialchars( $field ); |
373 | | - $s .= "<td class=\"$class\">$formatted</td>\n"; |
374 | | - } |
375 | | - $s .= "</tr>\n"; |
376 | | - return $s; |
377 | | - } |
378 | | - |
379 | 358 | function getTitle() { |
380 | 359 | return SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() ); |
381 | 360 | } |