http://www.mediawiki.org/wiki/Special:Code/MediaWiki/99014
Revision: 99014 Author: aaron Date: 2011-10-05 17:40:39 +0000 (Wed, 05 Oct 2011) Log Message: ----------- Added $this->currentUnixTS as with PendingChanges Modified Paths: -------------- trunk/extensions/FlaggedRevs/presentation/specialpages/reports/ProblemChanges_body.php Modified: trunk/extensions/FlaggedRevs/presentation/specialpages/reports/ProblemChanges_body.php =================================================================== --- trunk/extensions/FlaggedRevs/presentation/specialpages/reports/ProblemChanges_body.php 2011-10-05 17:25:04 UTC (rev 99013) +++ trunk/extensions/FlaggedRevs/presentation/specialpages/reports/ProblemChanges_body.php 2011-10-05 17:40:39 UTC (rev 99014) @@ -13,6 +13,8 @@ $this->setHeaders(); $this->skin = $wgUser->getSkin(); + $this->currentUnixTS = wfTimestamp( TS_UNIX ); // now + $this->level = $wgRequest->getInt( 'level', - 1 ); $this->tag = trim( $wgRequest->getVal( 'tagfilter' ) ); $category = trim( $wgRequest->getVal( 'category' ) ); @@ -218,10 +220,8 @@ } # Get how long the first unreviewed edit has been waiting... if ( $row->pending_since ) { - static $currentTime; - $currentTime = wfTimestamp( TS_UNIX ); // now $firstPendingTime = wfTimestamp( TS_UNIX, $row->pending_since ); - $hours = ( $currentTime - $firstPendingTime ) / 3600; + $hours = ( $this->currentUnixTS - $firstPendingTime ) / 3600; // After three days, just use days if ( $hours > ( 3 * 24 ) ) { $days = round( $hours / 24, 0 ); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs