r65377 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65376‎ | r65377 | r65378 >
Date:12:27, 21 April 2010
Author:jojo
Status:ok
Tags:
Comment:
removed invalid usage of parseFormattedNumber()
Modified paths:
  • /trunk/extensions/Collection/Collection.php (modified) (history)
  • /trunk/extensions/Collection/Collection.templates.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Collection.php
@@ -177,15 +177,13 @@
178178 $wgAjaxExportList[] = 'wfAjaxPostCollection';
179179
180180 function wfAjaxGetMWServeStatus( $collection_id = '', $writer = 'rl' ) {
181 - global $wgLang;
182 -
183181 $json = new Services_JSON();
184182 $result = SpecialCollection::mwServeCommand( 'render_status', array(
185183 'collection_id' => $collection_id,
186184 'writer' => $writer
187185 ) );
188186 if ( isset( $result['status']['progress'] ) ) {
189 - $result['status']['progress'] = $wgLang->parseFormattedNumber( number_format( $result['status']['progress'], 2 ) );
 187+ $result['status']['progress'] = number_format( $result['status']['progress'], 2, '.', '' );
190188 }
191189 $r = new AjaxResponse( $json->encode( $result ) );
192190 $r->setContentType( 'application/json' );
Index: trunk/extensions/Collection/Collection.templates.php
@@ -349,7 +349,7 @@
350350 <span style="display:none" id="renderingArticle"><?php echo ' ' . wfMsg( 'coll-rendering_article', '%PARAM%' ) ?></span>
351351 <span style="display:none" id="renderingPage"><?php echo ' ' . wfMsg( 'coll-rendering_page', '%PARAM%' ) ?></span>
352352
353 -<?php echo wfMsg( 'coll-rendering_text', $GLOBALS['wgLang']->parseFormattedNumber( number_format( $this->data['progress'], 2 ) ), $this->data['status'] ) ?>
 353+<?php echo wfMsg( 'coll-rendering_text', number_format( $this->data['progress'], 2, '.', '' ), $this->data['status'] ) ?>
354354
355355 <?php
356356 if ( CollectionSession::isEnabled() ) {

Status & tagging log