r59944 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59943‎ | r59944 | r59945 >
Date:01:07, 11 December 2009
Author:tparscal
Status:ok
Tags:
Comment:
Added Year-to-date field.
Modified paths:
  • /trunk/extensions/ContributionReporting/ContributionReporting.i18n.php (modified) (history)
  • /trunk/extensions/ContributionReporting/FundraiserStatistics_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ContributionReporting/FundraiserStatistics_body.php
@@ -131,7 +131,9 @@
132132 Xml::element( 'td', $tdLabelAttributes, wfMsg( 'fundraiserstats-contributions' ) ) .
133133 Xml::element( 'td', $tdValueAttributes, $wgLang->formatNum( number_format( $day[2] ) ) ) .
134134 Xml::element( 'td', $tdLabelAttributes, wfMsg( 'fundraiserstats-avg' ) ) .
135 - Xml::element( 'td', $tdValueAttributes, $wgLang->formatNum( number_format( $day[3], 2 ) ) )
 135+ Xml::element( 'td', $tdValueAttributes, $wgLang->formatNum( number_format( $day[3], 2 ) ) ) .
 136+ Xml::element( 'td', $tdLabelAttributes, wfMsg( 'fundraiserstats-ytd' ) ) .
 137+ Xml::element( 'td', $tdValueAttributes, $wgLang->formatNum( number_format( $day[5], 2 ) ) )
136138 )
137139 )
138140 );
@@ -215,7 +217,9 @@
216218 )
217219 );
218220 $totals = array();
 221+ $ytd = 0;
219222 while ( $row = $dbr->fetchRow( $res ) ) {
 223+ $row[] = $ytd += $row[1];
220224 $totals[] = $row;
221225 }
222226 return $totals;
Index: trunk/extensions/ContributionReporting/ContributionReporting.i18n.php
@@ -76,6 +76,7 @@
7777 'fundraiserstats-contributions' => 'Contributions',
7878 'fundraiserstats-total' => 'Total (USD)',
7979 'fundraiserstats-avg' => 'Average (USD)',
 80+ 'fundraiserstats-ytd' => 'YTD Total (USD)',
8081 // 'fundraiserstats-med' => 'Median (USD)',
8182 'fundraiserstats-max' => 'Maximum (USD)',
8283 'fundraiserstats-tab-totals' => 'Totals (USD)',

Follow-up revisions

RevisionCommit summaryAuthorDate
r59957wmf-deployment: Merge r59944 (year-to-date field in fundraiser statistics) fr...catrope18:10, 11 December 2009

Status & tagging log