r99015 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99014‎ | r99015 | r99016 >
Date:17:43, 5 October 2011
Author:aaron
Status:ok
Tags:
Comment:
Added $this->currentUnixTS as with PendingChanges
Modified paths:
  • /trunk/extensions/FlaggedRevs/presentation/specialpages/reports/UnreviewedPages_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/presentation/specialpages/reports/UnreviewedPages_body.php
@@ -16,6 +16,7 @@
1717 return;
1818 }
1919 $this->skin = $wgUser->getSkin();
 20+ $this->currentUnixTS = wfTimestamp( TS_UNIX ); // now
2021
2122 # Get default namespace
2223 $namespaces = FlaggedRevs::getReviewNamespaces();
@@ -118,10 +119,8 @@
119120 $stxt = " <small>$stxt</small>";
120121 }
121122 # Get how long the first unreviewed edit has been waiting...
122 - static $currentTime;
123 - $currentTime = wfTimestamp( TS_UNIX ); // now
124123 $firstPendingTime = wfTimestamp( TS_UNIX, $row->creation );
125 - $hours = ( $currentTime - $firstPendingTime ) / 3600;
 124+ $hours = ( $this->currentUnixTS - $firstPendingTime ) / 3600;
126125 // After three days, just use days
127126 if ( $hours > ( 3 * 24 ) ) {
128127 $days = round( $hours / 24, 0 );

Status & tagging log