Index: trunk/extensions/ContributionReporting/FundraiserStatistics_body.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | } |
17 | 17 | |
18 | 18 | public function execute( $sub ) { |
19 | | - global $wgOut, $wgLang, $wgScriptPath, $egFundraiserStatisticsFundraisers; |
| 19 | + global $wgRequest, $wgOut, $wgUser, $wgLang, $wgScriptPath, $egFundraiserStatisticsFundraisers; |
20 | 20 | |
21 | 21 | /* Configuration (this isn't totally static data, some of it gets built on the fly) */ |
22 | 22 | |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | |
80 | 80 | // Chart maximums |
81 | 81 | foreach ( $egFundraiserStatisticsFundraisers as $fundraiser ) { |
82 | | - foreach ( $charts as $name ) { |
| 82 | + foreach ( $charts as $name => $chart ) { |
83 | 83 | $chartMax = $this->query( $charts[$name]['query'], $fundraiser['start'], $fundraiser['end'] ); |
84 | 84 | if ( $chartMax > $charts[$name]['max'] ) { |
85 | 85 | $charts[$name]['max'] = $chartMax; |
— | — | @@ -161,7 +161,7 @@ |
162 | 162 | // Tabs |
163 | 163 | $first = true; |
164 | 164 | $htmlCharts = Xml::openElement( 'div', array( 'class' => 'fundraiserstats-chart-tabs' ) ); |
165 | | - foreach ( $charts as $chart ) { |
| 165 | + foreach ( $charts as $chart => $columns ) { |
166 | 166 | $htmlCharts .= Xml::tags( |
167 | 167 | 'div', |
168 | 168 | array( |
— | — | @@ -244,7 +244,7 @@ |
245 | 245 | ); |
246 | 246 | $result = array(); |
247 | 247 | $ytd = 0; |
248 | | - foreach ( $select as $row ) { |
| 248 | + while ( $row = $dbr->fetchRow( $select ) ) { |
249 | 249 | $row[] = $ytd += $row[1]; // YTD |
250 | 250 | $result[] = $row; |
251 | 251 | } |