From: Alexandre Emsenhuber Date: Sat, 29 Dec 2012 15:47:22 +0000 (+0100) Subject: Use Html::rawElement() instead of hardcoded string in Special:Contributions X-Git-Tag: 1.31.0-rc.0~21169^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=097eceafa27b92f5e26f399ee6e5c944016b0744;p=lhc%2Fweb%2Fwiklou.git 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 --- 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__ );