r77484 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77483‎ | r77484 | r77485 >
Date:17:27, 30 November 2010
Author:raymond
Status:ok
Tags:
Comment:
Show "last updated" only if timestamp is valid. Fixes
Notice: Undefined variable: date in \extensions\FlaggedRevs\specialpages\ValidationStatistics_body.php on line 60
Notice: Undefined variable: time in \extensions\FlaggedRevs\specialpages\ValidationStatistics_body.php on line 60
Modified paths:
  • /trunk/extensions/FlaggedRevs/specialpages/ValidationStatistics_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/specialpages/ValidationStatistics_body.php
@@ -24,10 +24,6 @@
2525 $mdt = $this->getMedianReviewWait();
2626 $pt = $this->getMeanPendingWait();
2727 $timestamp = $this->getLastUpdate();
28 - if ( $timestamp != '-' ) {
29 - $date = $wgLang->date( $timestamp, true );
30 - $time = $wgLang->time( $timestamp, true );
31 - }
3228
3329 $wgOut->addWikiMsg( 'validationstatistics-users',
3430 $wgLang->formatnum( $ec ), $wgLang->formatnum( $rc )
@@ -56,8 +52,13 @@
5753 $reviewChart = '';
5854 }
5955
60 - # Show "last updated"...
61 - $wgOut->addWikiMsg( 'validationstatistics-lastupdate', $date, $time );
 56+ if ( $timestamp != '-' ) {
 57+ # Show "last updated"...
 58+ $wgOut->addWikiMsg( 'validationstatistics-lastupdate',
 59+ $wgLang->date( $timestamp, true ),
 60+ $wgLang->time( $timestamp, true )
 61+ );
 62+ }
6263 $wgOut->addHtml( '<hr/>' );
6364 # Show pending time stats...
6465 $wgOut->addWikiMsg( 'validationstatistics-pndtime', $wgLang->formatTimePeriod( $pt ) );

Status & tagging log