r71464 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71463‎ | r71464 | r71465 >
Date:07:17, 23 August 2010
Author:nikerabbit
Status:ok (Comments)
Tags:
Comment:
Number of active translators where broken for scales days and hours.

Cause was incorrect cutoff offset for timestamp trimming, resulting
it counting per minute for hours and per hour for days.
Modified paths:
  • /trunk/extensions/Translate/SpecialTranslationStats.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/SpecialTranslationStats.php
@@ -73,7 +73,9 @@
7474 if ( $lastMod ) return;
7575 }
7676
77 - $wgOut->disable();
 77+ if ( !$wgRequest->getBool( 'debug' ) ) {
 78+ $wgOut->disable();
 79+ }
7880
7981 if ( !class_exists( 'PHPlot' ) ) {
8082 header( "HTTP/1.0 500 Multi fail" );
@@ -632,8 +634,8 @@
633635 protected function formatTimestamp( $timestamp ) {
634636 global $wgContLang;
635637 switch ( $this->opts['scale'] ) {
636 - case 'hours' : $cut = 2; break;
637 - case 'days' : $cut = 4; break;
 638+ case 'hours' : $cut = 4; break;
 639+ case 'days' : $cut = 6; break;
638640 case 'months': $cut = 8; break;
639641 default : return $wgContLang->sprintfDate( $this->getDateFormat(), $timestamp );
640642 }

Comments

#Comment by Nikerabbit (talk | contribs)   07:54, 23 August 2010

Has unrelated change, but it can stay.

Status & tagging log