Index: trunk/extensions/ContributionReporting/DailyTotal_body.php |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | $wgOut->disable(); |
32 | 32 | $this->sendHeaders(); |
33 | 33 | |
34 | | - $start = time(); // Get the current unix timestamp |
| 34 | + $start = date( 'Y-m-d' ); // Get the current date |
35 | 35 | $total = $this->query( $timezone, $start ); |
36 | 36 | |
37 | 37 | $content = "wgFundraisingDailyTotal = $total;"; |
— | — | @@ -52,8 +52,8 @@ |
53 | 53 | $dbr = efContributionReportingConnection(); |
54 | 54 | #$dbr = wfGetDB( DB_MASTER ); |
55 | 55 | $conditions = array( |
56 | | - 'received >= ' . $dbr->addQuotes( wfTimestamp( TS_UNIX, $start + $timeShift ) ), |
57 | | - 'received <= ' . $dbr->addQuotes( wfTimestamp( TS_UNIX, $start + 24 * 60 * 60 + $timeShift ) ), |
| 56 | + 'received >= ' . $dbr->addQuotes( wfTimestamp( TS_UNIX, strtotime( $start ) + $timeShift ) ), |
| 57 | + 'received <= ' . $dbr->addQuotes( wfTimestamp( TS_UNIX, strtotime( $start ) + 24 * 60 * 60 + $timeShift ) ), |
58 | 58 | 'converted_amount >= ' . $egFundraiserStatisticsMinimum, |
59 | 59 | 'converted_amount <= ' . $egFundraiserStatisticsMaximum |
60 | 60 | ); |