r107747 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107746‎ | r107747 | r107748 >
Date:21:57, 31 December 2011
Author:reedy
Status:ok
Tags:
Comment:
Fix 0bps or less

r107744
Modified paths:
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/Language.php
@@ -3815,7 +3815,7 @@
38163816 function formatBitrate( $bps ) {
38173817 $units = array( '', 'kilo', 'mega', 'giga', 'tera', 'peta', 'exa', 'zeta', 'yotta' );
38183818 if ( $bps <= 0 ) {
3819 - return $this->formatNum( $bps ) . $units[0];
 3819+ return str_replace( '$1', $this->formatNum( $bps ), $this->getMessageFromDB( 'bitrate-bits' ) );
38203820 }
38213821 $unitIndex = (int)floor( log10( $bps ) / 3 );
38223822 $mantissa = $bps / pow( 1000, $unitIndex );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r107744Followup r107743, use messages in formatBitrate...reedy21:32, 31 December 2011

Status & tagging log