r39053 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39052‎ | r39053 | r39054 >
Date:07:53, 10 August 2008
Author:aaron
Status:old
Tags:
Comment:
Add outdated count
Modified paths:
  • /trunk/extensions/FlaggedRevs/language/ValidationStatistics.i18n.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/specialpages/ValidationStatistics_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/language/ValidationStatistics.i18n.php
@@ -19,6 +19,7 @@
2020 'validationstatistics-stable' => 'Reviewed',
2121 'validationstatistics-latest' => 'Latest reviewed',
2222 'validationstatistics-synced' => 'Synced/Reviewed',
 23+ 'validationstatistics-old' => 'Outdated',
2324 );
2425
2526 /** Message documentation (Message documentation) */
Index: trunk/extensions/FlaggedRevs/specialpages/ValidationStatistics_body.php
@@ -32,7 +32,7 @@
3333 $wgOut->addWikiText( wfMsg('validationstatistics-table') );
3434 $wgOut->addHTML( "<table class='wikitable flaggedrevs_stats_table'>\n" );
3535 $wgOut->addHTML( "<tr>\n" );
36 - $msgs = array("ns","total","stable","latest","synced"); // our headings
 36+ $msgs = array("ns","total","stable","latest","synced","old"); // our headings
3737 foreach( $msgs as $msg ) {
3838 $wgOut->addHTML( "<th>".wfMsg("validationstatistics-$msg")."</th>" );
3939 }
@@ -46,6 +46,8 @@
4747 $percRev = @sprintf( '%4.2f', 100*intval($row->reviewed)/intval($row->total) );
4848 $percLatest = @sprintf( '%4.2f', 100*intval($row->synced)/intval($row->total) );
4949 $percSynced = @sprintf( '%4.2f', 100*intval($row->synced)/intval($row->reviewed) );
 50+ $outdated = intval($row->reviewed) - intval($row->synced);
 51+ $outdated = max( 0, $outdated ); // lag between queries
5052
5153 $wgOut->addHTML( "<tr align='center'>" );
5254 $wgOut->addHTML( "<td>$NsText</td>" );
@@ -53,6 +55,7 @@
5456 $wgOut->addHTML( "<td>{$row->reviewed} <i>($percRev%)</i></td>" );
5557 $wgOut->addHTML( "<td>{$row->synced} <i>($percLatest%)</i></td>" );
5658 $wgOut->addHTML( "<td>$percSynced%</td>" );
 59+ $wgOut->addHTML( "<td>".$outdated."</td>" );
5760 $wgOut->addHTML( "</tr>" );
5861 }
5962 $wgOut->addHTML( "</table>" );

Follow-up revisions

RevisionCommit summaryAuthorDate
r39175Revert to r39053 after some complaints of things not working:...brion21:11, 11 August 2008

Status & tagging log