r28154 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r28153‎ | r28154 | r28155 >
Date:21:02, 4 December 2007
Author:brion
Status:old
Tags:
Comment:
Fix regression caused in r28141:
* reported byte sizes were a factor of 1024 off
* word count was missing, listing only $2

Note that 28141 (as fixed) uses formatSize() which in most cases will not include any decimals or thousands separators, as it rounds off to integral values.
Modified paths:
  • /trunk/extensions/LuceneSearch/LuceneSearch_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LuceneSearch/LuceneSearch_body.php
@@ -465,7 +465,9 @@
466466 }
467467
468468 $text = $rev->getText();
469 - $size = wfMsg( 'search-result-size', $this->mSkin->formatSize( sprintf( "%.1f", strlen( $text ) / 1024 ), str_word_count( $text ) ) );
 469+ $size = wfMsgHtml( 'search-result-size',
 470+ $this->mSkin->formatSize( strlen( $text ) ),
 471+ str_word_count( $text ) );
470472 $text = $this->removeWiki($text);
471473 $date = $wgContLang->timeanddate($rev->getTimestamp());
472474 } else {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r28141* (bug 10869) Use proper decimal and thousands separatorsraymond12:59, 4 December 2007

Status & tagging log