r46480 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46479‎ | r46480 | r46481 >
Date:20:08, 28 January 2009
Author:werdna
Status:ok
Tags:
Comment:
Allow individual TablePager rows to be styled with the internal method getRowClass, called in formatRow.
Modified paths:
  • /trunk/phase3/includes/Pager.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Pager.php
@@ -745,7 +745,8 @@
746746 }
747747
748748 function formatRow( $row ) {
749 - $s = "<tr>\n";
 749+ $class = $this->getRowClass( $row );
 750+ $s = "<tr class=\"$class\">\n";
750751 $fieldNames = $this->getFieldNames();
751752 $this->mCurrentRow = $row; # In case formatValue needs to know
752753 foreach ( $fieldNames as $field => $name ) {
@@ -761,6 +762,10 @@
762763 return $s;
763764 }
764765
 766+ function getRowClass($row) {
 767+ return '';
 768+ }
 769+
765770 function getIndexField() {
766771 return $this->mSort;
767772 }

Status & tagging log