From 097eceafa27b92f5e26f399ee6e5c944016b0744 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 29 Dec 2012 16:47:22 +0100 Subject: [PATCH] Use Html::rawElement() instead of hardcoded string in Special:Contributions Since there is generally no classes in the list items, this avoids having a lot of useless class="" in the output. Change-Id: I804af2269def1f06d023145c9ced6f1afa0d0c71 --- includes/specials/SpecialContributions.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index b6fea0212c..8bef55c81d 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -946,12 +946,11 @@ class ContribsPager extends ReverseChronologicalPager { // Let extensions add data wfRunHooks( 'ContributionsLineEnding', array( $this, &$ret, $row, &$classes ) ); - $classes = implode( ' ', $classes ); - if ( $classes === '' && $ret === '' ) { + if ( $classes === array() && $ret === '' ) { wfDebug( 'Dropping Special:Contribution row that could not be formatted' ); $ret = "\n"; } else { - $ret = "
  • $ret
  • \n"; + $ret = Html::rawElement( 'li', array( 'class' => $classes ), $ret ) . "\n"; } wfProfileOut( __METHOD__ ); -- 2.20.1