From: Raimond Spekking Date: Fri, 18 Feb 2011 11:20:49 +0000 (+0000) Subject: Don't clutter the HTML source with useless class="" X-Git-Tag: 1.31.0-rc.0~31930 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=a8c76bc86c963346d188d1087da64fd9524119b6;p=lhc%2Fweb%2Fwiklou.git Don't clutter the HTML source with useless class="" --- 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;