From ca36f19254071aa40c7291342bffdeb4f8be9df3 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 1 Mar 2012 21:29:11 +0000 Subject: [PATCH] * Pass number with numParams() to Message object and let that object format the number * Added missing escaped() call from my last commit --- includes/specials/SpecialImport.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) 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; } -- 2.20.1