r66285 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66284‎ | r66285 | r66286 >
Date:19:37, 12 May 2010
Author:aaron
Status:deferred
Tags:
Comment:
Timestamp query fix
Modified paths:
  • /trunk/extensions/ReaderFeedback/ReaderFeedback.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ReaderFeedback/ReaderFeedback.class.php
@@ -153,7 +153,9 @@
154154 * @param string $cache, optional param to not use cache
155155 * @returns string HTML table
156156 */
157 - public static function getVoteAggregates( $page, $period, $add = array(), $cache = 'useCache' ) {
 157+ public static function getVoteAggregates(
 158+ $page, $period, $add = array(), $cache = 'useCache'
 159+ ) {
158160 global $wgLang, $wgMemc;
159161 if( $period > 93 ) {
160162 return ''; // too big
@@ -182,7 +184,7 @@
183185 $cutoff_unixtime = $now - ($period * 24 * 3600);
184186 // Use integral number of days to be consistent with graphs
185187 $cutoff_unixtime = $cutoff_unixtime - ($cutoff_unixtime % 86400);
186 - $cutoff = $dbr->addQuotes( wfTimestamp( TS_MW, $cutoff_unixtime ) );
 188+ $cutoff = $dbr->addQuotes( $dbr->timestamp( $cutoff_unixtime ) );
187189 // Get the first revision possibly voted on in the range
188190 $firstRevTS = $dbr->selectField( 'revision',
189191 'rev_timestamp',

Status & tagging log