r104372 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104371‎ | r104372 | r104373 >
Date:23:10, 27 November 2011
Author:reedy
Status:ok
Tags:
Comment:
6 possible queries from one method? Now that's just hard to trace
Modified paths:
  • /trunk/extensions/ContributionReporting/FundraiserStatistics_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ContributionReporting/FundraiserStatistics_body.php
@@ -299,7 +299,7 @@
300300 'max(converted_amount)',
301301 ),
302302 $conditions,
303 - __METHOD__,
 303+ __METHOD__ . '-dailyTotals',
304304 array(
305305 'ORDER BY' => 'received',
306306 'GROUP BY' => "DATE_FORMAT(CONVERT_TZ(FROM_UNIXTIME(received),'+00:00','$this->timezone'),'%Y-%m-%d')"
@@ -316,7 +316,7 @@
317317 $result = $dbr->selectField( 'public_reporting',
318318 array( 'sum(converted_amount) as sum' ),
319319 $conditions,
320 - __METHOD__,
 320+ __METHOD__ . '-dailyTotalMax',
321321 array(
322322 'ORDER BY' => 'sum DESC',
323323 'GROUP BY' => "DATE_FORMAT(CONVERT_TZ(FROM_UNIXTIME(received),'+00:00','$this->timezone'),'%Y-%m-%d')"
@@ -327,14 +327,14 @@
328328 $result = $dbr->selectField( 'public_reporting',
329329 array( 'sum(converted_amount) as sum' ),
330330 $conditions,
331 - __METHOD__
 331+ __METHOD__ . '-yearlyTotalMax'
332332 );
333333 break;
334334 case 'contributionsMax':
335335 $result = $dbr->selectField( 'public_reporting',
336336 array( 'count(converted_amount) as sum' ),
337337 $conditions,
338 - __METHOD__,
 338+ __METHOD__ . '-contributionsMax',
339339 array(
340340 'ORDER BY' => 'sum DESC',
341341 'GROUP BY' => "DATE_FORMAT(CONVERT_TZ(FROM_UNIXTIME(received),'+00:00','$this->timezone'),'%Y-%m-%d')"
@@ -345,7 +345,7 @@
346346 $result = $dbr->selectField( 'public_reporting',
347347 array( 'avg(converted_amount) as sum' ),
348348 $conditions,
349 - __METHOD__,
 349+ __METHOD__ . '-averagesMax',
350350 array(
351351 'ORDER BY' => 'sum DESC',
352352 'GROUP BY' => "DATE_FORMAT(CONVERT_TZ(FROM_UNIXTIME(received),'+00:00','$this->timezone'),'%Y-%m-%d')"
@@ -356,7 +356,7 @@
357357 $result = $dbr->selectField( 'public_reporting',
358358 array( 'max(converted_amount) as sum' ),
359359 $conditions,
360 - __METHOD__,
 360+ __METHOD__ . '-maximumsMax',
361361 array(
362362 'ORDER BY' => 'sum DESC',
363363 'GROUP BY' => "DATE_FORMAT(CONVERT_TZ(FROM_UNIXTIME(received),'+00:00','$this->timezone'),'%Y-%m-%d')"

Follow-up revisions

RevisionCommit summaryAuthorDate
r104586MFT r104062, r104247, r104248, r104362, r104370, r104372, r104424, r104425, r...awjrichards20:22, 29 November 2011

Status & tagging log