From: Alexandre Emsenhuber Date: Thu, 1 Mar 2012 21:29:11 +0000 (+0000) Subject: * Pass number with numParams() to Message object and let that object format the number X-Git-Tag: 1.31.0-rc.0~24440 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=ca36f19254071aa40c7291342bffdeb4f8be9df3;p=lhc%2Fweb%2Fwiklou.git * Pass number with numParams() to Message object and let that object format the number * Added missing escaped() call from my last commit --- diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index a23f1d732e..dea2bac17a 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -352,8 +352,6 @@ class ImportReporter extends ContextSource { * @return void */ function reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo ) { - global $wgContLang; - $args = func_get_args(); call_user_func_array( $this->mOriginalPageOutCallback, $args ); @@ -364,19 +362,16 @@ class ImportReporter extends ContextSource { $this->mPageCount++; - $localCount = $this->getLanguage()->formatNum( $successCount ); - $contentCount = $wgContLang->formatNum( $successCount ); - if( $successCount > 0 ) { $this->getOutput()->addHTML( "
  • " . Linker::linkKnown( $title ) . " " . - $this->msg( 'import-revision-count', $localCount ) . + $this->msg( 'import-revision-count' )->numParams( $successCount )->escaped() . "
  • \n" ); $log = new LogPage( 'import' ); if( $this->mIsUpload ) { - $detail = $this->msg( 'import-logentry-upload-detail', - $contentCount )->inContentLanguage()->text(); + $detail = $this->msg( 'import-logentry-upload-detail' )->numParams( + $successCount )->inContentLanguage()->text(); if ( $this->reason ) { $detail .= $this->msg( 'colon-separator' )->inContentLanguage()->text() . $this->reason; } @@ -384,8 +379,8 @@ class ImportReporter extends ContextSource { } else { $interwiki = '[[:' . $this->mInterwiki . ':' . $origTitle->getPrefixedText() . ']]'; - $detail = $this->msg( 'import-logentry-interwiki-detail', - $contentCount, $interwiki )->inContentLanguage()->text(); + $detail = $this->msg( 'import-logentry-interwiki-detail' )->numParams( + $successCount )->params( $interwiki )->inContentLanguage()->text(); if ( $this->reason ) { $detail .= $this->msg( 'colon-separator' )->inContentLanguage()->text() . $this->reason; }