r58307 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58306‎ | r58307 | r58308 >
Date:10:34, 29 October 2009
Author:raymond
Status:ok
Tags:
Comment:
i18n tweak: Use commaList instead of hardcoded comma, use Html::function
Document function
Modified paths:
  • /trunk/extensions/CentralAuth/SpecialGlobalUsers.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/SpecialGlobalUsers.php
@@ -89,7 +89,13 @@
9090 );
9191 }
9292
 93+ /**
 94+ * Formats a row
 95+ * @param object $row The row to be formatted for output
 96+ * @return string HTML li element with username and info about this user
 97+ */
9398 function formatRow( $row ) {
 99+ global $wgLang;
94100 $user = htmlspecialchars( $row->gu_name );
95101 $info = array();
96102 if( $row->gu_locked )
@@ -105,8 +111,8 @@
106112 if( $groups ) {
107113 $info[] = $groups;
108114 }
109 - $info = implode( ', ', $info );
110 - return '<li>' . wfSpecialList( $user, $info ) . '</li>';
 115+ $info = $wgLang->commaList( $info );
 116+ return Html::rawElement( 'li', array(), wfSpecialList( $user, $info ) );
111117 }
112118
113119 function getBody() {

Status & tagging log