r108531 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108530‎ | r108531 | r108532 >
Date:18:28, 10 January 2012
Author:bsitu
Status:ok
Tags:
Comment:
follow up to -r108297 - cast numbers when outputting to html
Modified paths:
  • /trunk/extensions/MoodBar/SpecialFeedbackDashboard.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/SpecialFeedbackDashboard.php
@@ -101,7 +101,7 @@
102102
103103
104104 $moodbarStat = MoodBarUtil::getMoodBarTypeStats();
105 - $moodbarStatMsg = wfMessage( 'moodbar-type-stats' )->params( $moodbarStat['happy'], $moodbarStat['sad'], $moodbarStat['confused'] )->escaped();
 105+ $moodbarStatMsg = wfMessage( 'moodbar-type-stats' )->numParams( $moodbarStat['happy'], $moodbarStat['sad'], $moodbarStat['confused'] )->escaped();
106106 $feedbackDashboardDescription = wfMessage( 'moodbar-feedback-description' )->params( $wgSitename ); // don't escape because there is html
107107
108108 $myResponseFilter = '';
@@ -267,7 +267,8 @@
268268 * @return html string
269269 */
270270 protected static function buildLeaderBoardElement() {
271 -
 271+ global $wgLang;
 272+
272273 $topResponders = MoodBarUtil::getTopResponders();
273274
274275 $html = '';
@@ -277,7 +278,7 @@
278279 $user = User::newFromRow( $row );
279280 if ( $user && !$user->isAnon() ) {
280281 $html .= '<li>' . Linker::userLink( $user->getId(), htmlspecialchars( $user->getName() ) ) .
281 - '<span>' . $row->number . '</span></li>';
 282+ '<span>' . $wgLang->formatNum( intval( $row->number ) ) . '</span></li>';
282283 }
283284 }
284285 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108297Adding top responders leaderboard to feedback dashboard pagebsitu00:56, 7 January 2012

Status & tagging log