From a8c76bc86c963346d188d1087da64fd9524119b6 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Fri, 18 Feb 2011 11:20:49 +0000 Subject: [PATCH] Don't clutter the HTML source with useless class="" --- includes/Pager.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/Pager.php b/includes/Pager.php index bf613fdcdc..ee150a0bb0 100644 --- a/includes/Pager.php +++ b/includes/Pager.php @@ -868,7 +868,12 @@ abstract class TablePager extends IndexPager { function formatRow( $row ) { $this->mCurrentRow = $row; # In case formatValue etc need to know - $s = Xml::openElement( 'tr', $this->getRowAttrs($row) ); + $classArray = $this->getRowAttrs($row); + if ( $classArray['class'] === '' ) { + $s = Html::openElement( 'tr' ); + } else { + $s = Html::openElement( 'tr', $classArray ); + } $fieldNames = $this->getFieldNames(); foreach ( $fieldNames as $field => $name ) { $value = isset( $row->$field ) ? $row->$field : null; -- 2.20.1