Index: branches/wmf/1.18wmf1/extensions/ContributionReporting/ContributionReporting.php |
— | — | @@ -145,29 +145,17 @@ |
146 | 146 | $wgHooks['ParserFirstCallInit'][] = 'efContributionReportingSetup'; |
147 | 147 | $wgHooks['LanguageGetMagic'][] = 'efContributionReportingTotal_Magic'; |
148 | 148 | |
149 | | -/** |
150 | | - * @param $parser Parser |
151 | | - * @return bool |
152 | | - */ |
153 | 149 | function efContributionReportingSetup( $parser ) { |
154 | 150 | $parser->setFunctionHook( 'contributiontotal', 'efContributionReportingTotal_Render' ); |
155 | 151 | return true; |
156 | 152 | } |
157 | 153 | |
158 | | -/** |
159 | | - * @param $magicWords array |
160 | | - * @param $langCode string |
161 | | - * @return bool |
162 | | - */ |
163 | 154 | function efContributionReportingTotal_Magic( &$magicWords, $langCode ) { |
164 | 155 | $magicWords['contributiontotal'] = array( 0, 'contributiontotal' ); |
165 | 156 | return true; |
166 | 157 | } |
167 | 158 | |
168 | 159 | // Automatically use a local or special database connection |
169 | | -/** |
170 | | - * @return DatabaseMysql |
171 | | - */ |
172 | 160 | function efContributionReportingConnection() { |
173 | 161 | global $wgContributionReportingDBserver, $wgContributionReportingDBname; |
174 | 162 | global $wgContributionReportingDBuser, $wgContributionReportingDBpassword; |
— | — | @@ -186,9 +174,6 @@ |
187 | 175 | return $db; |
188 | 176 | } |
189 | 177 | |
190 | | -/** |
191 | | - * @return DatabaseMysql |
192 | | - */ |
193 | 178 | function efContributionTrackingConnection() { |
194 | 179 | global $wgContributionTrackingDBserver, $wgContributionTrackingDBname; |
195 | 180 | global $wgContributionTrackingDBuser, $wgContributionTrackingDBpassword; |
— | — | @@ -207,11 +192,6 @@ |
208 | 193 | return $db; |
209 | 194 | } |
210 | 195 | |
211 | | -/** |
212 | | - * @param $start |
213 | | - * @param $fudgeFactor |
214 | | - * @return string |
215 | | - */ |
216 | 196 | function efContributionReportingTotal( $start, $fudgeFactor ) { |
217 | 197 | $db = efContributionReportingConnection(); |
218 | 198 | |
— | — | @@ -233,9 +213,6 @@ |
234 | 214 | return $output; |
235 | 215 | } |
236 | 216 | |
237 | | -/** |
238 | | - * @return string |
239 | | - */ |
240 | 217 | function efContributionReportingTotal_Render() { |
241 | 218 | $args = func_get_args(); |
242 | 219 | array_shift( $args ); |
Property changes on: branches/wmf/1.18wmf1/extensions/ContributionReporting/ContributionReporting.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
243 | 220 | Merged /trunk/extensions/ContributionReporting/ContributionReporting.php:r104889 |
Index: branches/wmf/1.18wmf1/extensions/ContributionReporting/ContributionTrackingStatistics_body.php |
— | — | @@ -205,12 +205,7 @@ |
206 | 206 | |
207 | 207 | /* Query Functions */ |
208 | 208 | |
209 | | - /** |
210 | | - * Totals for today |
211 | | - * |
212 | | - * @param $timestamp string |
213 | | - * @return array |
214 | | - */ |
| 209 | + // Totals for today |
215 | 210 | public function getDayTotals( $timestamp = 0 ) { |
216 | 211 | $range = array(); |
217 | 212 | $end_format = 'Ymd235959'; |
— | — | @@ -255,21 +250,15 @@ |
256 | 251 | |
257 | 252 | ); |
258 | 253 | |
259 | | - $result = array(); |
260 | 254 | foreach ( $res as $row ) { |
261 | | - foreach( $row as $value ) { |
| 255 | + foreach( $row as $key => $value ) { |
262 | 256 | $result[] = $value; |
263 | 257 | } |
264 | 258 | } |
265 | 259 | return $result; |
266 | 260 | } |
267 | 261 | |
268 | | - /** |
269 | | - * Given a day figure out what its week bounds are |
270 | | - * |
271 | | - * @param $day |
272 | | - * @return array |
273 | | - */ |
| 262 | + // Given a day figure out what its week bounds are |
274 | 263 | public function weekRange( $day ) { |
275 | 264 | $day = wfTimestamp( TS_UNIX, $day ); |
276 | 265 | $start = ( date( 'w', $day ) == 0) ? $day : strtotime('last sunday', $day ); // Use current Sunday |
Property changes on: branches/wmf/1.18wmf1/extensions/ContributionReporting/ContributionTrackingStatistics_body.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
277 | 266 | Merged /trunk/extensions/ContributionReporting/ContributionTrackingStatistics_body.php:r104889 |
Index: branches/wmf/1.18wmf1/extensions/ContributionReporting/FundraiserStatistics_body.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | } |
17 | 17 | |
18 | 18 | public function execute( $sub ) { |
19 | | - global $wgRequest, $wgOut, $wgLang, $wgScriptPath, $egFundraiserStatisticsFundraisers; |
| 19 | + global $wgRequest, $wgOut, $wgUser, $wgLang, $wgScriptPath, $egFundraiserStatisticsFundraisers; |
20 | 20 | |
21 | 21 | $showYear = array(); |
22 | 22 | foreach ( $egFundraiserStatisticsFundraisers as $fundraiser ) { |
— | — | @@ -242,7 +242,7 @@ |
243 | 243 | Xml::tags( |
244 | 244 | 'table', |
245 | 245 | array( 'cellpadding' => 0, 'cellspacing' => 0, 'border' => 0 ), |
246 | | - Xml::tags( 'tr', null, implode( $chart['data'] ) ) // FIXME: Missing parameter to implode |
| 246 | + Xml::tags( 'tr', null, implode( $chart['data'] ) ) |
247 | 247 | ) |
248 | 248 | ); |
249 | 249 | $first = false; |
— | — | @@ -300,7 +300,7 @@ |
301 | 301 | ); |
302 | 302 | $result = array(); |
303 | 303 | $ytd = 0; |
304 | | - foreach( $select as $row ) { |
| 304 | + while ( $row = $dbr->fetchRow( $select ) ) { |
305 | 305 | $row[] = $ytd += $row[1]; // YTD |
306 | 306 | $result[] = $row; |
307 | 307 | } |
— | — | @@ -364,10 +364,6 @@ |
365 | 365 | return null; |
366 | 366 | } |
367 | 367 | |
368 | | - /** |
369 | | - * @param $values |
370 | | - * @return string |
371 | | - */ |
372 | 368 | private function dropDownList ( $values ) { |
373 | 369 | $dropDown = ''; |
374 | 370 | foreach ( $values as $value ) { |
Property changes on: branches/wmf/1.18wmf1/extensions/ContributionReporting/FundraiserStatistics_body.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
375 | 371 | Merged /trunk/extensions/ContributionReporting/FundraiserStatistics_body.php:r104889 |
Index: branches/wmf/1.18wmf1/extensions/ContributionReporting/ContributionHistory_body.php |
— | — | @@ -11,6 +11,7 @@ |
12 | 12 | $wgOut->redirect( SpecialPage::getTitleFor( 'FundraiserStatistics' )->getFullURL() ); |
13 | 13 | return; |
14 | 14 | |
| 15 | + |
15 | 16 | if ( !preg_match( '/^[a-z-]+$/', $language ) ) { |
16 | 17 | $language = 'en'; |
17 | 18 | } |
Property changes on: branches/wmf/1.18wmf1/extensions/ContributionReporting/ContributionHistory_body.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
18 | 19 | Merged /trunk/extensions/ContributionReporting/ContributionHistory_body.php:r104889 |
Index: branches/wmf/1.18wmf1/extensions/ContributionReporting/ContributionStatistics_body.php |
— | — | @@ -275,10 +275,6 @@ |
276 | 276 | |
277 | 277 | /* Query Functions */ |
278 | 278 | |
279 | | - /** |
280 | | - * @param $limit int |
281 | | - * @return array |
282 | | - */ |
283 | 279 | public function getDailyTotals( $limit = 30 ) { |
284 | 280 | // Get connection |
285 | 281 | $dbr = efContributionReportingConnection(); |
— | — | @@ -374,9 +370,6 @@ |
375 | 371 | return $totals; |
376 | 372 | } |
377 | 373 | |
378 | | - /** |
379 | | - * @return array |
380 | | - */ |
381 | 374 | public function getCurrencyTotals() { |
382 | 375 | // Get connection |
383 | 376 | $dbr = efContributionReportingConnection(); |
— | — | @@ -506,10 +499,6 @@ |
507 | 500 | ); |
508 | 501 | } |
509 | 502 | |
510 | | - /** |
511 | | - * @param $dbr DatabaseBase |
512 | | - * @return array |
513 | | - */ |
514 | 503 | protected function dateConds( $dbr ) { |
515 | 504 | return |
516 | 505 | array( |
Property changes on: branches/wmf/1.18wmf1/extensions/ContributionReporting/ContributionStatistics_body.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
517 | 506 | Merged /trunk/extensions/ContributionReporting/ContributionStatistics_body.php:r104889 |
Property changes on: branches/wmf/1.18wmf1/extensions/ContributionReporting |
___________________________________________________________________ |
Modified: svn:mergeinfo |
518 | 507 | Merged /trunk/extensions/ContributionReporting:r104889 |